Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8753] Android: View "click" events do not fire when touch listeners are present.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-02-25T17:29:20.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi, exalture, tbs-2.1.0
ReporterJosh Roesslein
AssigneeSunila
Created2012-04-17T10:03:56.000+0000
Updated2017-03-21T22:30:13.000+0000

Description

If a view has both "click" and "touch" listeners, the click events do not fire.

var win =Ti.UI.createWindow();

var view = Ti.UI.createView({
	width: 100, height: 100,
	backgroundColor: "blue"
});

// This will not fire if the "touchstart" listener
// bellow is enabled.
view.on("click", function() {
	view.backgroundColor = "red";
});

// If this listener is commented out, the click
// events will fire properly.
view.on("touchstart", function() {
	view.backgroundColor = "yellow";
});
win.add(view);

win.open();

Comments

  1. Sunila 2013-02-25

    Tested with 3.1.0, I can see both Yellow background on touch and then it turns to Red.
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source