[TIMOB-8061] MobileWeb: ScrollView - Using pinch to zoom produced the error "TypeError: Result of expression 'this._touchEndLocation' [null] is not an object."
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-19T22:17:31.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | MobileWeb |
Labels | qe-mw020912 |
Reporter | Michael Pettiford |
Assignee | Chris Barber |
Created | 2012-03-16T13:15:25.000+0000 |
Updated | 2017-03-03T23:37:08.000+0000 |
Description
Steps to reproduce:
1. Create a default mobile web app and change the app.js code to the following:
var _window = Titanium.UI.createWindow({
title : 'test',
backgroundColor : 'black'
});
var photosView = Ti.UI.createScrollableView({
backgroundColor:'black',
width : 320,
height : 450,
showPagingControl:true,
pagingControlHeight:20,
});
var imgArray = [];
var img1 = Ti.UI.createImageView({
image:'http://media.koreus.com/200606/1image-illusion-optique14-mini.jpg'
});
// with maxZoomScale commented out it produces the same result
var imgWrapper = Ti.UI.createScrollView({
maxZoomScale:2.0,
});
imgWrapper.add(img1);
imgArray.push(imgWrapper);
photosView.views = imgArray;
_window.add(photosView);
_window.open();
2. Run the app
3. Pinch to zoom the image
Actual result:
An error of "TypeError: Result of expression 'this._touchEndLocation' [null] is not an object." is produced
Expected result:
One is able to pinch to zoom the image
Note: Zooming a scroll view is not supported on Mobile Web, and thus maxZoomScale is not supported either. It doesn't hurt to define it, but the value is not used anywhere. The crash is a valid bug though, obviously.
Also note: Mobile Web does not support zooming an image view either.
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1741
Closing ticket as MobileWeb is no longer supported.