From: Alexander Ebert Date: Thu, 30 Jan 2020 12:41:40 +0000 (+0100) Subject: Disable `transform: translate` when entering fullscreen mode in the editor X-Git-Tag: 5.2.2~23^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9714ac308e4c96255d1b4d8aad0b002b5648b7d8;p=GitHub%2FWoltLab%2FWCF.git Disable `transform: translate` when entering fullscreen mode in the editor The transform of `.anchorFixedHeader` introduces a new stacking context which will cause `position: fixed` inside to be relative to the container, instead of the document. --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabFullscreen.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabFullscreen.js index 150bfcd5ff..841657bd4d 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabFullscreen.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabFullscreen.js @@ -35,6 +35,9 @@ $.Redactor.prototype.WoltLabFullscreen = function() { _button.children[0].classList.toggle('fa-compress'); _button.children[0].classList.toggle('fa-expand'); + var anchorFixedHeader = elClosest(this.core.box()[0], '.anchorFixedHeader'); + if (anchorFixedHeader) anchorFixedHeader.classList.toggle('disableAnchorFixedHeader'); + if (this.core.box()[0].classList.toggle('redactorBoxFullscreen')) { WCF.System.DisableScrolling.disable(); _active = true; diff --git a/wcfsetup/install/files/style/ui/message.scss b/wcfsetup/install/files/style/ui/message.scss index 282b8e025f..b7008b870f 100644 --- a/wcfsetup/install/files/style/ui/message.scss +++ b/wcfsetup/install/files/style/ui/message.scss @@ -38,7 +38,7 @@ } } - > .anchorFixedHeader:target { + > .anchorFixedHeader:not(.disableAnchorFixedHeader):target { margin-top: -49px; pointer-events: none; position: relative;