Fixed headlines being handled as regular blocks
authorAlexander Ebert <ebert@woltlab.com>
Tue, 30 Aug 2016 14:09:41 +0000 (16:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 30 Aug 2016 14:09:41 +0000 (16:09 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabCaret.js

index 95c00bd6fa1b243fcaa4ddfacedc77612c212a51..61c65f08e69d5f9589b13beb1f79c83e6379cc04 100644 (file)
@@ -154,6 +154,11 @@ $.Redactor.prototype.WoltLabCaret = function() {
                                }
                        }
                        
+                       // ignore headlines
+                       if (block.nodeName.match(/^H\d$/)) {
+                               return;
+                       }
+                       
                        this.buffer.set();
                        
                        // click occurred onto the empty editor space, but before or after a block element