From f70a269803d4dbf02a37ebeb948011e51e6e7859 Mon Sep 17 00:00:00 2001 From: Jan Keromnes Date: Thu, 18 Jul 2019 09:57:02 +0000 Subject: [PATCH] [mobile] Prevent the IDE from scrolling along with the text (e.g. on iPad) Ref: https://github.com/theia-ide/theia/issues/3557 Co-authored-by: Vincent Fugnitto Signed-off-by: Jan Keromnes --- CHANGELOG.md | 1 + packages/core/src/browser/frontend-application.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72580c124d496..6dc96a8f62061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [plugin] Fixed `Converting circular structure to JSON` Error [#5661](https://github.com/theia-ide/theia/pull/5661) - [plugin] fixed auto detection of new languages [#5753](https://github.com/theia-ide/theia/issues/5753) - [vscode] unzip node_modules for built-in extensions [#5756](https://github.com/theia-ide/theia/pull/5756) +- [core] prevent the IDE from scrolling along with the text on mobile (e.g. on iPad) [#5742](https://github.com/theia-ide/theia/pull/5742) Breaking changes: diff --git a/packages/core/src/browser/frontend-application.ts b/packages/core/src/browser/frontend-application.ts index aa435c37f0d6a..fccc1b54a9103 100644 --- a/packages/core/src/browser/frontend-application.ts +++ b/packages/core/src/browser/frontend-application.ts @@ -162,6 +162,7 @@ export class FrontendApplication { }); window.addEventListener('resize', () => this.shell.update()); document.addEventListener('keydown', event => this.keybindings.run(event), true); + document.addEventListener('touchmove', event => { event.preventDefault(); }, { passive: false }); // Prevent forward/back navigation by scrolling in OS X if (isOSX) { document.body.addEventListener('wheel', preventNavigation, { passive: false });