Fixed inserting tables
authorAlexander Ebert <ebert@woltlab.com>
Fri, 19 Aug 2016 11:38:06 +0000 (13:38 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 19 Aug 2016 11:38:06 +0000 (13:38 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/table.js

index 1c91a4f0a52bdbbae74ae2ba08b5c5faa3fa6d68..c645d594891d136fb27fc6ea4c66e9c65ab25e63 100644 (file)
                                this.buffer.set();
 
                                var current = this.selection.current();
-                               if ($(current).closest('li').length !== 0)
+                               // see https://github.com/Redactor2/plugins/pull/3
+                               //if ($(current).closest('li').length !== 0)
+                               if ($(current).closest('li', this.core.editor().get(0)).length !== 0)
                                {
                                        $(current).closest('ul, ol').first().after(html);
                                }