Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Provide events to initialize backend module JS #5390

Open
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

markusguenther
Copy link
Member

@markusguenther markusguenther commented Dec 2, 2024

The backend module vanilla JS was only initialized on DOMContentLoaded event.
When you replace the markup in the backend module you probably need to reinitialze
the vanilla JS components for the menu or drop down for instance.

You can use it like this.

window.dispatchEvent(new CustomEvent("neos:neos:initialize", {
     bubbles: true,
     cancelable: true,
 }));

The change provide the following events:

  • neos:neos:initialize
  • neos:neos:initialize-modal
  • neos:neos:initialize-menu-panel
  • neos:neos:initialize-tree
  • neos:neos:initialize-expandable-elements
  • neos:neos:initialize-drop-down-menus
  • neos:neos:initialize-user-management
  • neos:neos:initialize-user-menu

The backend module vanilla JS was only initialized on DOMContentLoaded event.
When you replace the markup in the backend module you probably need to reinitialze
the vanilla JS components for the menu or drop down for instance.
Copy link
Contributor

@pKallert pKallert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out locally and works fine 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants