fix: fixed click events didn't take effect on safari mobile

This commit is contained in:
hsycc 2021-10-28 16:47:27 +08:00
parent 21b8bdd0f3
commit 88a3e0e41e

View File

@ -85,12 +85,12 @@
this.container.addEventListener('wheel', this.onMousewheel_.bind(this));
}
window.addEventListener('mouseup', this.onMouseup_.bind(this));
window.addEventListener('mousemove', this.onMousemove_.bind(this));
window.addEventListener('keyup', this.onKeyup_.bind(this));
window.addEventListener('touchstart', this.onTouchstart_.bind(this));
window.addEventListener('touchmove' , this.onTouchmove_.bind(this));
window.addEventListener('touchend', this.onTouchend_.bind(this));
this.container.addEventListener('mouseup', this.onMouseup_.bind(this));
this.container.addEventListener('mousemove', this.onMousemove_.bind(this));
this.container.addEventListener('keyup', this.onKeyup_.bind(this));
this.container.addEventListener('touchstart', this.onTouchstart_.bind(this));
this.container.addEventListener('touchmove' , this.onTouchmove_.bind(this));
this.container.addEventListener('touchend', this.onTouchend_.bind(this));
// Deactivate right click:
document.body.addEventListener('contextmenu', this.onCanvasContextMenu_.bind(this));