-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Allow modal triggers to be added after module initialization #25435
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
Allow modal triggers to be added after module initialization #25435
Conversation
Hi @krzksz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
this pull messed up two of my extensions causing non-accessible pop-ups to appear! Zombie pop-ups! |
Dear @southerncomputer, I can see tests failing so there are some adjustments that have to be done to make this work. Can you please share some more information about the issue, preferably in pure Magento so I can reproduce it? |
@magento give me test instance |
Hi @krzksz. Thank you for your request. I'm working on Magento instance for you |
Hi @krzksz, here is your new Magento instance. |
e55486f
to
43cb134
Compare
Fixes magento#9671. Event delegation is used to allow different modal opening trigger elements to be added at any time as long as they match given selector.
43cb134
to
17a8aa9
Compare
Hey @southerncomputer, can you retest your problem with newest changes in this PR? |
@krzksz seems to have fixed my modules problems! |
Hi @dmytro-ch, thank you for the review. |
✔️ QA Passed |
Hi @krzksz, thank you for your contribution! |
@krzksz will be great if you will cover your changes with the unit test ( you can check that event triggered ). Thanks |
@VladimirZaets Gladly, I will prepare a separate PR. |
Description (*)
Fixes #9671. Event delegation is used to allow different modal opening trigger elements to be added at any time as long as they match given selector.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Sync Modal Trigger
button would actually open a modal as it is already present in the DOM tree when modal is initialized. With this patch any button that matches the selector given intrigger
option will work no matter when it appeared in DOM, which can be tested by clickingAsync Modal Trigger
button.Contribution checklist (*)