From: Alexander Ebert Date: Thu, 27 Apr 2017 14:10:19 +0000 (+0200) Subject: Avoid incorrect style editor behavior on screen-xs X-Git-Tag: 3.0.5~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76f2a1ce79262892cbedbabeb70c97ac622e5e05;p=GitHub%2FWoltLab%2FWCF.git Avoid incorrect style editor behavior on screen-xs --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Editor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Editor.js index edc7aae4f6..1e1a2cdef6 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Editor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Style/Editor.js @@ -14,6 +14,7 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'EventHandler', 'Ui/Screen'], var _stylePreviewWindow = elById('spWindow'); var _isVisible = true; + var _isSmartphone = false; var _updateRegionMarker = null; /** @@ -139,6 +140,10 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'EventHandler', 'Ui/Screen'], var lastValue = select.value; _updateRegionMarker = function() { + if (_isSmartphone) { + return; + } + if (lastValue === 'none') { elHide(_stylePreviewRegionMarker); updateWrapperPosition(null); @@ -285,6 +290,8 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'EventHandler', 'Ui/Screen'], elHide(_stylePreviewWindow); elById('spVariablesWrapper').style.removeProperty('transform'); elHide(elById('stylePreviewRegionMarker')); + + _isSmartphone = true; }, showVisualEditor: function() { @@ -293,6 +300,8 @@ define(['Ajax', 'Core', 'Dictionary', 'Dom/Util', 'EventHandler', 'Ui/Screen'], window.setTimeout(function() { Core.triggerEvent(elById('spCategories'), 'change'); }, 100); + + _isSmartphone = false; } }; });