Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8061] MobileWeb: ScrollView - Using pinch to zoom produced the error "TypeError: Result of expression 'this._touchEndLocation' [null] is not an object."

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-19T22:17:31.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsMobileWeb
Labelsqe-mw020912
ReporterMichael Pettiford
AssigneeChris Barber
Created2012-03-16T13:15:25.000+0000
Updated2017-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

Comments

  1. Bryan Hughes 2012-03-18

    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.
  2. Bryan Hughes 2012-03-18

    Also note: Mobile Web does not support zooming an image view either.
  3. Bryan Hughes 2012-03-19

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1741
  4. Lee Morris 2017-03-03

    Closing ticket as MobileWeb is no longer supported.

JSON Source