mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
perf(tapclick): tapPolyfill is only used in UIWebView!
- improves drastically the responsiveness in WK and iOS Safari
This commit is contained in:
@ -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';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user