From: Alexander Ebert Date: Sun, 19 Jun 2016 12:12:44 +0000 (+0200) Subject: Fixed caret position on link insert in Firefox X-Git-Tag: 3.0.0_Beta_1~117^2~71 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47820b708aa31c00d2aa151b6378bbcf0e60ef8d;p=GitHub%2FWoltLab%2FWCF.git Fixed caret position on link insert in Firefox --- 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);