Commit 1ba09307 authored by Phil Hughes's avatar Phil Hughes

Checks for relatedTarget

If related target is undefined then we can't complete the below code
parent c9cc64f5
...@@ -217,6 +217,7 @@ class GitLabDropdown ...@@ -217,6 +217,7 @@ class GitLabDropdown
if e.which is 27 # Escape key if e.which is 27 # Escape key
$('.dropdown-menu-close', @dropdown).trigger 'click' $('.dropdown-menu-close', @dropdown).trigger 'click'
@dropdown.on 'blur', 'a', (e) => @dropdown.on 'blur', 'a', (e) =>
if e.relatedTarget?
$relatedTarget = $(e.relatedTarget) $relatedTarget = $(e.relatedTarget)
$dropdownMenu = $relatedTarget.closest('.dropdown-menu') $dropdownMenu = $relatedTarget.closest('.dropdown-menu')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment