Problem: The range of the selection may be modified by the execCommand in
Firefox, at least since version 14.
Solution: Re-establish the range.
Change-Id: Ied6ff3570be99bac993163cc94b801a3872aa6a9
Resolves: #39662
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/15666
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
} else {
this.editor.getSelection().execCommand('CreateLink', false, theLink);
}
- // Get the created link or parent
+ // Get the created link or parent
node = this.editor.getSelection().getParentElement();
+ // Re-establish the range of the selection
+ range = this.editor.getSelection().createRange();
if (node) {
// Export trailing br that IE may include in the link
if (Ext.isIE) {