Fixed clicking into empty space after a table
authorAlexander Ebert <ebert@woltlab.com>
Tue, 23 Aug 2016 16:41:31 +0000 (18:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 23 Aug 2016 16:41:31 +0000 (18:41 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js

index b313147d52ba5a088ceb391117eaba24cfa5399d..92f93e499ca86dc8871051a621f71278ecd71328 100644 (file)
@@ -38,6 +38,12 @@ $.Redactor.prototype.WoltLabCaret = function() {
                                }
                        }
                        
+                       if (block.nodeName === 'TD') {
+                               while (block.nodeName !== 'TABLE') {
+                                       block = block.parentNode;
+                               }
+                       }
+                       
                        this.buffer.set();
                        
                        // click occurred onto the empty editor space, but before or after a block element