Project

General

Profile

Actions

Bug #77170

closed

Creating a link in FF or IE highlights the parent element

Added by Frank Berger over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2016-07-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Actions

Also available in: Atom PDF