[TIMOB-25420] Android: ScrollView does not fire "longclick" events.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-23T22:31:27.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.3.0 |
Components | Android |
Labels | android, longclick, scrollview |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2017-10-20T21:55:33.000+0000 |
Updated | 2017-10-26T22:10:38.000+0000 |
Description
*Summary:*
An Android ScrollView's scrollable content area never fires a "longclick" event.
*Steps to reproduce:*
Run the below test code on an Android device.
Tap and hold your finger on the app window for a couple of seconds.
var window = Ti.UI.createWindow();
var scrollView = Ti.UI.createScrollView();
scrollView.addEventListener('longclick', function(e) {
alert('longclick');
});
window.add(scrollView);
window.open();
*Result:*
No alert is displayed for the "longclick" event.
*Expected Result:*
An alert displaying "longclick" should be displayed when the event has been received.
*Work-Around:*
The "longpress" event is supported. This event can be used instead.
*Note:*
On Android, the "longpress" and "longclick" events are normally fired back-to-back.
PR (6.3.x): https://github.com/appcelerator/titanium_mobile/pull/9543 PR (master): https://github.com/appcelerator/titanium_mobile/pull/9545
FR Passed for both PR's. Master merged, waiting for merge to get enabled for 6.3.0.
PR for backport merged.
Verified the fix in SDK 6.3.0.v20171026120401 & 7.0.0.v20171025141436. Closing. Studio Ver: 4.10.0.201709271713 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10-2 Appc CLI: 6.3.0-master.15 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.6 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 — Android 6.0.1 ⇨ google Pixel — Android 7.1.1