slow clicks (and fastclick doesn't work) & slow backbutton behaviour (cordova + angular.js)

549 views
Skip to first unread message

luc...@arielext.org

unread,
Jan 7, 2014, 5:08:00 PM1/7/14
to phon...@googlegroups.com
Hi,

I'm writing an android app using the tools I know best: html/css/js and a bit of Java.
I'm having 2 difficulties I can't seem to fix a.t.m.

1) tapping on a link (a ng-href style) fires a click event with a 300ms delay
2) pushing the hardware backbutton has a ~ 500ms delay

1) I've tested this with Android 4.4 on a HTC One and Android 4.3 on an Asus pad. Using the chrome remote debugging while using the HTC One I can see  in the timeline tab that when I click a link the click event is fired and takes about 350ms to respond. Even though I have fastclick in the project and enabled (i think ... how can I verify this?)
2) The backbutton (and other native to javascript calls) tend to be slow; no idea on how to speed this up; If i tap the back button multiple times the whole routing flies into view (this is non-cached non-history data!) making me think that the javascript code is ok, but the native to js bridge is slow.

Any tips on how to speed these things up a bit?

Christopher Wyllie

unread,
Jun 15, 2014, 8:17:43 AM6/15/14
to phon...@googlegroups.com
Hi,

It is my belief that the 300ms click delay is disabled on Android webviews that use the width=device-width viewport meta tag: http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away I may also suggest including the FastClick JS library to remove this delay for other platforms that have it.

I am seeing the second issue with a delay on the back button press too, but so far haven't been able to find out why. Does anyone have any suggestions?

Thanks,
  Chris

Christopher Wyllie

unread,
Jun 17, 2014, 6:24:49 AM6/17/14
to phon...@googlegroups.com
Just a follow up on my back button delay. It seemed related to some large background images I had set on the body of the page. When I had scaled the assets for production, the back button delay was greatly reduced.
Reply all
Reply to author
Forward
0 new messages