Add originalEvent to eventListeners
Created by: jakubhonisek
Add 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.