How can I eliminate the ~300ms tap delay on iOS devices when using Dart Polymer's paper-elements together with Angular 2?
e.g. In an Angular 2 component, if I have an HTML template that includes paper-button
with (click)="myFunc()"
, in iOS devices, myFunc is called after this dreaded infamous delay.
I've tried using FastClick.js, but after I attach it (to the body, or a specific paper-button), the element is no longer clickable, I can still see the ripple effect when I tap it, but the method is not getting called (on mobile, however in desktop browsers it works as usual), it also has the same effect on paper-input
(s), it's not getting focused.
Can something be done about it? Maybe a Dart/Angular2 equivalent of FastClick.js could be made?
Update 1
It's worth mentioning that under a UIWebView (cordova), I couldn't get Angular2.dart and Polymer.dart to work at the same time, it seems they don't play well together, which is also a blocker, could use some help on that as well.
Update 2
Sources: https://github.com/aabluedragon/dart_issue_polymer_angular2_cordova
Update 3
- White screen issue: It appears that the white screen problem on first run under Cordova is related to Polymer; it has nothing to do with Angular2.
- Tap delay: Using Polymer's
on-tap
event prevents the tap delay, however, that means you cannot use Angular2's (click) events, which don't handle taps nicely as Polymer.