[TIMOB-20374] Android: Longpress event on ScrollView doesn't fire
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-05T04:27:26.000+0000 |
Affected Version/s | Release 5.1.2 |
Fix Version/s | n/a |
Components | Android |
Labels | Android, ScrollView, longpress |
Reporter | Thomas Neerup |
Assignee | Srikanth Sombhatla |
Created | 2016-02-09T06:58:15.000+0000 |
Updated | 2017-03-21T18:41:49.000+0000 |
Description
On Android the longpress event don't fire when longpress is performed directly on the ScrollView.
In the example below the longpress event is performed when long pressing on the "red" View in the ScrollView but don't fire when long pressing below the View directly on the green ScrollView.
If I change onLongpress with onClick the click event fires as expected.
<Alloy>
<Window backgroundColor="white">
<ScrollView backgroundColor="green" onLongpress="onLongPress">
<View height="100" top="0" backgroundColor="red"></View>
</ScrollView>
</Window>
</Alloy>
function onLongPress(e) {
Ti.API.info('e:' + JSON.stringify(e));
}
$.index.open();
PR: https://github.com/appcelerator/titanium_mobile/pull/7912 Use the following app.js for testing
Updated code for testing to:-
PR reviewed and merged.
Closing ticket as fixed.