From 4ac5f76b4ee5804919a832729a7ab384ea9d9a4d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 20 Nov 2020 18:39:33 +0100 Subject: [PATCH] Workaround for a Chromium bug on Windows --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js index 3aa76597d8..6011c6e14b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js @@ -224,6 +224,15 @@ define(['Core', 'Dictionary', 'Environment'], function(Core, Dictionary, Environ } } else { + // Chromium based browsers running on Windows suffer from a bug when + // used with the responsive mode of the DevTools. Enabling and + // disabling it will trigger some media queries to report a change + // even when there isn't really one. This cause errors when invoking + // "unmatch" handlers that rely on the setup being executed before. + if (queryObject.callbacksSetup.size) { + return; + } + queryObject.callbacksUnmatch.forEach(function(callback) { callback(); }); -- 2.20.1