[TIMOB-8753] Android: View "click" events do not fire when touch listeners are present.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2013-02-25T17:29:20.000+0000 |
| Affected Version/s | Release 2.1.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | api, exalture, tbs-2.1.0 |
| Reporter | Josh Roesslein |
| Assignee | Sunila |
| Created | 2012-04-17T10:03:56.000+0000 |
| Updated | 2017-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();
Tested with 3.1.0, I can see both Yellow background on touch and then it turns to Red.
Closing ticket as the issue cannot be reproduced and due to the above comments.