Bug #78730

rtehtmlarea: isRequiredClass check is incorrect

Added by Benjamin Franzke almost 3 years ago. Updated 12 months ago.

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

100%

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())

Associated revisions

Revision 30d9a1c6 (diff)
Added by Benjamin Franzke almost 3 years ago

[BUGFIX] rtehtmlarea: Fix isRequiredClass check

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 unneeded 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).

Releases: master, 7.6
Resolves: #78730
Change-Id: I5a6ac42c7080835d5018608ab17a39b36a0fb70a
Reviewed-on: https://review.typo3.org/50692
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision 8d9b76b9 (diff)
Added by Benjamin Franzke almost 3 years ago

[BUGFIX] rtehtmlarea: Fix isRequiredClass check

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 unneeded 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).

Releases: master, 7.6
Resolves: #78730
Change-Id: I5a6ac42c7080835d5018608ab17a39b36a0fb70a
Reviewed-on: https://review.typo3.org/50893
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50692

#2 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50692

#3 Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50893

#4 Updated by Benjamin Franzke almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF