Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25420] Android: ScrollView does not fire "longclick" events.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2017-10-23T22:31:27.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.3.0
ComponentsAndroid
Labelsandroid, longclick, scrollview
ReporterJoshua Quick
AssigneeJoshua Quick
Created2017-10-20T21:55:33.000+0000
Updated2017-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.

Comments

  1. Joshua Quick 2017-10-23

    PR (6.3.x): https://github.com/appcelerator/titanium_mobile/pull/9543 PR (master): https://github.com/appcelerator/titanium_mobile/pull/9545
  2. Lokesh Choudhary 2017-10-23

    FR Passed for both PR's. Master merged, waiting for merge to get enabled for 6.3.0.
  3. Lokesh Choudhary 2017-10-26

    PR for backport merged.
  4. Lokesh Choudhary 2017-10-26

    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

JSON Source