perf(tapclick): tapPolyfill is only used in UIWebView!

- improves drastically the responsiveness in WK and iOS Safari
This commit is contained in:
Manu Mtz.-Almeida
2016-11-17 17:27:45 +01:00
parent 0883f98b0f
commit 0c61c2a8c1
3 changed files with 37 additions and 10 deletions

View File

@ -32,7 +32,8 @@ export class TapClick {
this.activator = new Activator(app, config);
}
this.usePolyfill = (config.get('tapPolyfill') === true);
this.usePolyfill = config.getBoolean('tapPolyfill');
console.debug('Using usePolyfill:', this.usePolyfill);
this.events.listen(document, 'click', this.click.bind(this), true);
this.pointerEvents = this.events.pointerEvents({
@ -96,7 +97,7 @@ export class TapClick {
if (!this.app.isEnabled()) {
preventReason = 'appDisabled';
} else if (!ev.isIonicTap && this.isDisabledNativeClick()) {
} else if (this.usePolyfill && !ev.isIonicTap && this.isDisabledNativeClick()) {
preventReason = 'nativeClick';
}