From bd2b91d346ffc0cbbd0f78a05ffaf58f032140fb Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 7 Sep 2017 12:50:52 +0200 Subject: [PATCH] Fixed variable usage --- .../files/js/3rdParty/redactor2/plugins/WoltLabObserve.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js index 8314670c69..b99a45f3b2 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js @@ -104,10 +104,12 @@ $.Redactor.prototype.WoltLabObserve = function() { this.observe.dropdowns = (function() { var current = this.selection.current(); if (current && current.nodeType !== Node.ELEMENT_NODE) current = current.parentNode; + var editor = this.$editor[0]; + var isRedactor = (current && current.closest('.redactor-layer') === editor); var tagName, tags = []; - if (current && current.closest('.redactor-layer') === editor) { + if (isRedactor) { while (current !== editor) { tagName = current.nodeName.toLowerCase(); if (tags.indexOf(tagName) === -1) { -- 2.20.1