-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Add originalEvent to eventListeners #26336
Comments
you already know which element was clicked before the dropdown was closed by |
In |
Hmm ok, understood thanks 👍 |
You could include something like this above where you include bootstrap js.
If you want to modify the function you were with something like this.
|
This is similar/the same request to my #24010. |
thats right ! Thanks @alecpl, so close for consistency 👍 |
@morrissey-ingenious: But this modification stops propagation all click on the page. I have the same problem. @Johann-S Will you modify dropdown.js? |
When I'll have time to work on that @ondrajodas, but every issues are open, so if someone want to fix this issue he should do it 😄 |
Add
originalEvent
to bootstrapeventListeners
like hide.bs.dropdown, if support it.I need to know, which element was clicked, before a dropdown was closed. I tried to add this code to the
Dropdown._clearMenus
function indropdown.js
file (after the definition of therelatedTarget
variable).if (event) { relatedTarget.original = event.originalEvent; }
This code snippet make the
originalEvent
accessible from thehide.bs.dropdown
event. For other events may be used similar way.The text was updated successfully, but these errors were encountered: