Actions
Bug #86701
closedSetting different link targets in Link Browser does not work properly
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2018-10-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
As part of the RTE configuration (either yaml File or PageTS) you can define the default target attribute for links in the linkbrowser.
Example (yaml):
buttons: link: properties: class: allowedClasses: "internal-link,external-link" page: properties: class: default: "internal-link" url: properties: class: default: "external-link" classesAnchor: internalLink: class: "internal-link" type: "page" target: "_top" externalLink: class: "external-link" type: "url" target: "_blank"
The example above defines target="_top"
for the internal link class and target="_blank"
for the external link class.
Steps to reproduce:
- Define a RTE configuration as shown above
- Create a text content element, paste some random text and link the pasted text
- When the linkbrowser opens initially, the Link Browser tab "Page" is shown with the default link target "_top"
- Select the tab "External URL" and the default link target keeps "_top", which is wrong
- Select the tab "Email"
- Select the tab "External URL" again and now the default link target is "_blank"
I tested this with ext:rte_ckeditor
and with ext:rtehtmlarea
.
The reason for this behavior is, that the Link Browser uses the default target attribute of the first tab that is opened and passes it as link parameter linkAttributes[target]=
to all other tabs. Bugfix could be to exclude the linkAttributes[target]=
parameter.
The bug affects TYPO3 v9 and v8 and propably lower versions.
Actions