From 47820b708aa31c00d2aa151b6378bbcf0e60ef8d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 19 Jun 2016 14:12:44 +0200 Subject: [PATCH] Fixed caret position on link insert in Firefox --- .../files/js/3rdParty/redactor/plugins/wmonkeypatch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 51796be594..dca87328b7 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -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); -- 2.20.1