Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10153] Android: Button: Touchend event not fired when touchmove gesture moves out of button

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-16T14:58:59.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sSprint 2012-16 API, Release 2.1.2, Release 3.0.0
ComponentsAndroid
Labelsapi, module_button, parity, qe-and070112, qe-testadded
ReporterSatyam Sekhri
AssigneeKarl Rowley
Created2012-07-26T02:55:42.000+0000
Updated2012-08-16T19:25:33.000+0000

Description

The touchend event is not fired for button when touchmove moves outside the button This is not a regression. This occurs as far as 2.0.1 Steps to Reproduce: 1. Create an app with code below and launch the app 2. Touch on the button and without ending the touch move finger outside the button Expected: The touchend event should fire when touch gesture ends, as in iOS Actual: touchend event is not fired and touchmove event for button continues to fire even after touchend outside the button
var win = Ti.UI.createWindow();
		var button = Ti.UI.createButton({
			top:'10%',
			bottom:'10%',
			left:'10%',
			right:'10%'
			});
		
		button.addEventListener('touchmove',function(){
			Ti.API.info('touchmove fired');
			button.title = 'touchmove fired'
		});
		button.addEventListener('touchstart',function(){
			Ti.API.info('touchstart fired');
			button.title = 'touchstart fired'
		});
		button.addEventListener('touchend',function(){
			Ti.API.info('touchend fired');
			button.title = 'touchend fired'
		});
		
		win.add(button);
win.open();

Comments

  1. Vishal Duggal 2012-07-31

    Android actually fires a touchcancel (manually) if the point is outside the bounds of the view.
  2. Karl Rowley 2012-08-02

    Pull request https://github.com/appcelerator/titanium_mobile/pull/2669
  3. Evgenii Tcarev 2012-08-10

    Verified fixed with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK, build: 2.2.0.v20120810132430 Device: Samsung Nexus S (4.1.1)

JSON Source