From: Alexander Ebert Date: Fri, 21 May 2021 13:42:07 +0000 (+0200) Subject: Incorrect check for ignored mutation events X-Git-Tag: 5.4.0_Beta_1~45 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e2d81b83c818f0de2e096da624ba30c2577d9f41;p=GitHub%2FWoltLab%2FWCF.git Incorrect check for ignored mutation events --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js index ce97b48e8a..890579aac9 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js @@ -37,11 +37,17 @@ $.Redactor.prototype.WoltLabEvent = function() { // WoltLab modification: do not suppress event if nodes have been added // WoltLab modification 2: suppress broken MutationRecords in Vivaldi 1.13 that yield attribute changes without the attribute name // WoltLab modification 3: do not suppres event if nodes have been removed - if (((this.opts.type === 'textarea' || this.opts.type === 'div') - && (!this.detect.isFirefox() && mutation.target === this.core.editor()[0]) && (mutation.type === 'childList' && !mutation.addedNodes.length && !mutation.removedNodes.length)) - || (mutation.attributeName === 'class' && mutation.target === this.core.editor()[0] - || (mutation.attributeName === 'data-vivaldi-spatnav-clickable') - || (mutation.type === 'attributes' && mutation.attributeName === null)) + // WoltLab modification 4: suppress mutations caused by `focus-visible.js` + if ( + ( + (this.opts.type === 'textarea' || this.opts.type === 'div') + && (!this.detect.isFirefox() && mutation.target === this.core.editor()[0]) + && (mutation.type === 'childList' && !mutation.addedNodes.length && !mutation.removedNodes.length) + ) + || mutation.attributeName === 'class' && mutation.target === this.core.editor()[0] + || mutation.attributeName === 'data-vivaldi-spatnav-clickable' + || mutation.type === 'attributes' && mutation.attributeName === null + || mutation.attributeName === "data-focus-visible-added" ) { stop = true;