Skip to content
Snippets Groups Projects
Commit eab9be48 authored by Arinde Eniola's avatar Arinde Eniola
Browse files

make some changes to enable the links in the dropdown to be clickable

parent cbeddc63
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -416,13 +416,13 @@ class GitLabDropdown
return selectedObject
 
selectRowAtIndex: (index) ->
selector = ".dropdown-content li:not(.divider):eq(#{index}) a"
selector = ".dropdown-content li:not(.divider):has('a'):eq(#{index}) a"
 
if @dropdown.find(".dropdown-toggle-page").length
selector = ".dropdown-page-one #{selector}"
 
# simulate a click on the first link
$(selector, @dropdown).trigger "click"
$(selector, @dropdown)[0].click() if $(selector, @dropdown)[0]
 
addArrowKeyEvent: ->
ARROW_KEY_CODES = [38, 40]
Loading
Loading
@@ -457,6 +457,8 @@ class GitLabDropdown
return false
 
if currentKeyCode is 13
e.preventDefault()
e.stopImmediatePropagation()
@selectRowAtIndex currentIndex
 
removeArrayKeyEvent: ->
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