From 540253bb91ea8a376db480bee143cf3fe0c4fe64 Mon Sep 17 00:00:00 2001 From: Lukasz Ostafin Date: Thu, 19 Sep 2024 10:50:39 +0200 Subject: [PATCH] After CR --- .../custom-tags/block-custom-tag/custom-tag-ui.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js index cb565771..0fcc8b9e 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js @@ -19,21 +19,19 @@ class IbexaCustomTagUI extends Plugin { this.addCustomTag = this.addCustomTag.bind(this); this.isNew = false; - this.lastClassListValue = null; this.observer = new MutationObserver((mutationList) => { for (const mutation of mutationList) { - if (this.lastClassListValue !== mutation.target.classList.value) { - if (this.lastClassListValue !== null) { + if (mutation.attributeName === "class") { + if (mutation.oldValue !== mutation.target.classList.value) { setPanelContentMaxHeight(this.balloon.view); } - - this.lastClassListValue = mutation.target.classList.value; } } }); this.observer.observe(this.balloon.view.element, { attributes: true, + attributeOldValue: true, }); }