Fixed variable usage
authorAlexander Ebert <ebert@woltlab.com>
Thu, 7 Sep 2017 10:50:52 +0000 (12:50 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 7 Sep 2017 10:50:52 +0000 (12:50 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js

index 8314670c69c89316ed9d3cf9629326dbd742a234..b99a45f3b2e7789319903da70c6c7858b8db8ed7 100644 (file)
@@ -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) {