Skip to content
Snippets Groups Projects
Commit c9cc64f5 authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed issue with focusing out of dropdown not hiding menu

parent 77c8600a
No related branches found
No related tags found
1 merge request!4704Fixed search field blur not removing focus
Loading
Loading
@@ -216,6 +216,12 @@ class GitLabDropdown
@dropdown.on 'keyup', (e) =>
if e.which is 27 # Escape key
$('.dropdown-menu-close', @dropdown).trigger 'click'
@dropdown.on 'blur', 'a', (e) =>
$relatedTarget = $(e.relatedTarget)
$dropdownMenu = $relatedTarget.closest('.dropdown-menu')
if $dropdownMenu.length is 0
@dropdown.removeClass('open')
 
if @dropdown.find(".dropdown-toggle-page").length
@dropdown.find(".dropdown-toggle-page, .dropdown-menu-back").on "click", (e) =>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment