# HG changeset patch # User Alain Mazy # Date 1547802993 -3600 # Node ID 59b4afa92dee68e3daf296800ffe1aeaac79a720 # Parent 9a8fe40acfff882a8217f132f63d829b7f103152 TS: stop propagating touch events to the whole html doc diff -r 9a8fe40acfff -r 59b4afa92dee Platforms/Wasm/wasm-viewport.ts --- a/Platforms/Wasm/wasm-viewport.ts Thu Jan 17 21:41:38 2019 +0100 +++ b/Platforms/Wasm/wasm-viewport.ts Fri Jan 18 10:16:33 2019 +0100 @@ -220,14 +220,27 @@ }); this.htmlCanvas_.addEventListener('touchstart', function(event) { + // don't propagate events to the whole body (this could zoom the entire page instead of zooming the viewport) + event.preventDefault(); + event.stopPropagation(); + that.ResetTouch(); }); this.htmlCanvas_.addEventListener('touchend', function(event) { + // don't propagate events to the whole body (this could zoom the entire page instead of zooming the viewport) + event.preventDefault(); + event.stopPropagation(); + that.ResetTouch(); }); this.htmlCanvas_.addEventListener('touchmove', function(event) { + + // don't propagate events to the whole body (this could zoom the entire page instead of zooming the viewport) + event.preventDefault(); + event.stopPropagation(); + if (that.touchTranslation_.length == 2) { var t = that.GetTouchTranslation(event); that.ViewportMouseMove(that.pimpl_, t[0], t[1]);