mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(tap-click): disabling it in server rendering
This commit is contained in:
@ -25,11 +25,15 @@ export class TapClick {
|
||||
passive = true;
|
||||
attachTo = 'document';
|
||||
|
||||
@Prop({context: 'isServer'}) isServer: boolean;
|
||||
@Prop({context: 'enableListener'}) enableListener: EventListenerEnable;
|
||||
|
||||
@Element() el: HTMLElement;
|
||||
|
||||
componentDidLoad() {
|
||||
if (this.isServer) {
|
||||
return;
|
||||
}
|
||||
this.gestureCtrl = Ionic.gesture = Ionic.gesture || new GestureController();
|
||||
|
||||
this.app = this.el.closest('ion-app') as HTMLIonAppElement;
|
||||
|
||||
Reference in New Issue
Block a user