Skip to content

Commit

Permalink
[BUGFIX] Bind module menu event listener to document
Browse files Browse the repository at this point in the history
With #91642 some event listeners were detached from the global document
object and reattached to better fitting DOM nodes to avoid pollution of
too many event listeners in document.

Unfortunately, this broke the module menu toggle after it has been
reloaded, e.g. after installing an extension via Extension Manager.

This change binds the event listener for the module menu state toggle to
the document object again.

Resolves: #93008
Related: #91642
Releases: master
Change-Id: I5da58a997db311205accfbaf57874460ce077e91
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67091
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
andreaskienast authored and bmack committed Dec 11, 2020
1 parent 180bf9f commit 352a2a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -250,7 +250,7 @@ class ModuleMenu {
Viewport.doLayout();
}
});
}).delegateTo(document.querySelector('.t3js-modulemenu'), '.t3js-modulemenu-collapsible');
}).delegateTo(document, '.t3js-modulemenu .t3js-modulemenu-collapsible');

new RegularEvent('click', (e: Event, target: HTMLElement): void => {
if (typeof target.dataset.link !== 'undefined') {
Expand Down

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

0 comments on commit 352a2a7

Please sign in to comment.