Fixed caret position on link insert in Firefox
authorAlexander Ebert <ebert@woltlab.com>
Sun, 19 Jun 2016 12:12:44 +0000 (14:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 19 Jun 2016 12:12:44 +0000 (14:12 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 51796be594c3fbb4acbf2467f0b33bd420c6f341..dca87328b738e80397dfb9a2e18c7c4dfe648881 100644 (file)
@@ -1331,6 +1331,11 @@ RedactorPlugins.wmonkeypatch = function() {
                                }
                        }).bind(this);
                        
+                       // selection.selectElement
+                       this.selection.selectElement = (function(node) {
+                               this.caret.set(node, 0, node, 1);
+                       }).bind(this);
+                       
                        // selection.removeMarkers
                        this.selection.removeMarkers = (function() {
                                this.$editor.find('span.redactor-selection-marker').each($removeEmptyTextNodes);