From f9e3dc2b456066dfd8d070cd5d8b512cc9235288 Mon Sep 17 00:00:00 2001 From: Thilo Billerbeck Date: Sun, 24 Jan 2021 01:02:29 +0100 Subject: [PATCH] only react to screen resize when device has no touchscreen (#650) --- webroot/js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webroot/js/app.js b/webroot/js/app.js index 8f9ea0d0f..e0d691ab5 100644 --- a/webroot/js/app.js +++ b/webroot/js/app.js @@ -104,7 +104,9 @@ export default class App extends Component { componentDidMount() { this.getConfig(); - window.addEventListener('resize', this.handleWindowResize); + if (!this.hasTouchScreen) { + window.addEventListener('resize', this.handleWindowResize); + } window.addEventListener('blur', this.handleWindowBlur); window.addEventListener('focus', this.handleWindowFocus); if (this.hasTouchScreen) {