Project

General

Profile

Actions

Bug #78730

closed

rtehtmlarea: isRequiredClass check is incorrect

Added by Benjamin Franzke about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-11-17
Due date:
% Done:

100%

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

Description

Given the following TSConfig:

RTE {
classes {
btn-default {
name = Default Button
requires = btn
}
btn-primary {
name = Primary Button
requires = btn
}
btn.selectable = 0
}
}

The incorrect isRequiredClass check causes the btn class to be
removed from the RTE toolbarbuttons. This happens because it's
considered unneded in DOM.removeClass(), which is called by
DOM.addClass() (to remove incompatible classes).

The check in isRequiredClass was probably copied from
some classesRequired lookups, but forgot to inverse the
class that's searched for.

This also fixes the RTE to properly remove the selectable=0 class
(e.g. btn), when a class that requires the aformentioned is removed
(e.g. btn-primary).

(Note: To avoid further incompatibilities between classes configured
for the RTE content and the RTE toolbar, it should be consided to not
render RTE Buttons using DOM.addClass())

Actions

Also available in: Atom PDF