Add originalEvent to eventListeners
See original GitHub issueAdd originalEvent
to bootstrap eventListeners
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 in dropdown.js
file (after the definition of the relatedTarget
variable).
if (event) { relatedTarget.original = event.originalEvent; }
This code snippet make the originalEvent
accessible from the hide.bs.dropdown
event. For other events may be used similar way.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
EventTarget.addEventListener() - Web APIs | MDN
The method addEventListener() works by adding a function, or an object that implements EventListener , to the list of event listeners for ...
Read more >Adding event listeners to current and future elements with a ...
this basically adds a click event listener to the #myWrappingElement element, and jquery will automagically look to see what the original event ......
Read more >.on() | jQuery API Documentation
Description: Attach an event handler function for one or more events to the selected elements. version added: 1.7.on( events [, selector ] [,...
Read more >Simple Custom Event Listeners With Google Tag Manager
How to create simple custom event listeners with Google Tag Manager. You can track any user interaction on the site with this solution....
Read more >Events - Polymer Project
Add event listeners to the host element by providing a listeners object that ... In this example, the original event is triggered on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm ok, understood thanks 👍
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 😄