Skip to content

Commit

Permalink
[BUGFIX] Respect data-content for modals again
Browse files Browse the repository at this point in the history
With the upgrade to Bootstrap 5, modals unintentionally don't support
the `data-content` attribute anymore as this was automatically migrated
to the namespaced variant `data-bs-content`. While this is technically
correct for Bootstrap 5, Core still needs to support the old variant as
documented.

Resolves: #98067
Releases: main, 12.4, 11.5
Change-Id: I544cbd779c808727c472575654adca3dc4c91197
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79961
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
  • Loading branch information
andreaskienast authored and o-ba committed Jul 11, 2023
1 parent 63c8769 commit f446526
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -377,7 +377,7 @@ class Modal {
$(theDocument).on('click', '.t3js-modal-trigger', (evt: JQueryEventObject): void => {
evt.preventDefault();
const $element = $(evt.currentTarget);
const content = $element.data('bs-content') || 'Are you sure?';
const content = $element.data('bs-content') || $element.data('content') || 'Are you sure?';
let severity = SeverityEnum.info;
if ($element.data('severity') in SeverityEnum) {
const severityKey: keyof typeof SeverityEnum = $element.data('severity');
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/backend/Resources/Public/JavaScript/Modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f446526

Please sign in to comment.