Stop blur event which is fired before click event when a dropdown item is clicked, otherwise click event is sometimes not fired

This commit is contained in:
Evren Ozkan 2017-05-05 16:16:25 -04:00
parent c60f202135
commit a63a41ebde

View File

@ -260,6 +260,12 @@ OHIF.mixins.dropdown = new OHIF.Mixin({
}
},
'mousedown .dropdown'(event) {
// This is required to stop blur event which is fired before click event
// when a dropdown item is clicked, otherwise click event is not fired
event.stopPropagation();
},
'blur .dropdown'(event, instance) {
// Stop here if it's closed or if it's a submenu not being closed
if (instance.closed) return;