Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7483] iOS: 'twofingertap' overrides all other events

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2012-01-31T10:04:11.000+0000
Affected Version/sRelease 1.8.1
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterStephen Tramer
AssigneeNeeraj Gupta
Created2012-01-31T09:50:16.000+0000
Updated2017-03-09T23:08:35.000+0000

Description

Issue

When a view contains a 'twofingertap' event listener, this is the only listener ever triggered, regardless of other touch event listeners.

Testing

var win = Ti.UI.createWindow();
var view = Ti.UI.createView({
	backgroundColor:'red',
	width:200,
	height:200
});

var events = ['click', 'dblclick', 'doubletap', 'longpress', 
	'pinch', 'singletap', 'swipe', 'touchcancel', 'touchend', 'touchmove',
	'touchstart', 'twofingertap'];	
	
for (var index in events) 
{
	var event = events[index];
	view.addEventListener(event, function() {
		Ti.API.info('Event: '+event);
	});
}

win.add(view);
win.open();
1. Try and perform all events on the view *PASS:* Events fire correctly *FAIL:* Only twofingertap fires

Comments

  1. Stephen Tramer 2012-01-31

    Appears to be, instead, a reference vs. value issue. Checking with somebody more experienced with JS interpreter behavior when it comes to configuration loops like this before marking invalid or changing description.
  2. Stephen Tramer 2012-01-31

    This is a good demonstration of a JS antipattern, it turns out.
  3. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source