Commit 3d41a44d authored by Phil Hughes's avatar Phil Hughes

Cache the selectors

parent dc87499e
...@@ -565,11 +565,13 @@ class GitLabDropdown ...@@ -565,11 +565,13 @@ class GitLabDropdown
if $el.length and currentIndex > -1 if $el.length and currentIndex > -1
e.preventDefault() e.preventDefault()
e.stopImmediatePropagation() e.stopImmediatePropagation()
$first = $el.first()
$firstEl = $first.get(0)
if $el.first().get(0).click if $firstEl.click
$el.first().get(0).click() $firstEl.click()
else else
$el.first().trigger('click') $first.trigger('click')
addArrowKeyEvent: -> addArrowKeyEvent: ->
ARROW_KEY_CODES = [38, 40] ARROW_KEY_CODES = [38, 40]
......
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