Bug #77170
closedCreating a link in FF or IE highlights the parent element
0%
Description
When creating a link in rtehtmlarea by selecting text, opening the dialog and clicking a targetpage, the link gets created correctly but the whole paragraph / the respecting parent element gets highlighted.
The normal behaviour would be that the link-text is highlighted again.
Reproduceable in
Typo3 7.6.10
FF 50.0a1
FF 45.0a1
older FF
IE 10 & 11
All of this works in Chrome.
File sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Link.js
Line 256
this.editor.getSelection().selectNodeContents(node);
seems responsible here, in Case of FF and IE 'node' holds the parent Element, while in Chrome this holds the created or updated link-element
Line 241
node = this.editor.getSelection().getParentElement();
explicitly loads the parent into node to check for clean-up issues, which explains why node is the paragraph... Wondering right now why it actually works in Chrome.
moving line 256 from the else body into the if body mitigates the problem, but I don't know about other side-effects