From e2d81b83c818f0de2e096da624ba30c2577d9f41 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 21 May 2021 15:42:07 +0200 Subject: [PATCH] Incorrect check for ignored mutation events --- .../3rdParty/redactor2/plugins/WoltLabEvent.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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; -- 2.20.1