summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/gl_dropdown.js.coffee6
-rw-r--r--app/assets/stylesheets/framework/dropdowns.scss11
2 files changed, 5 insertions, 12 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index 1937e5367db..5a555175291 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -326,8 +326,8 @@ class GitLabDropdown
).join('')
noResults: ->
- html = "<li class='dropdown-menu-empty-link is-focused'>"
- html += "<a href='#'>"
+ html = "<li class='dropdown-menu-empty-link'>"
+ html += "<a href='#' class='is-focused'>"
html += "No matching results."
html += "</a>"
html += "</li>"
@@ -433,7 +433,7 @@ class GitLabDropdown
# Update the class for the row at the specific index
$listItem = $listItems.eq(index)
- $listItem.addClass "is-focused"
+ $listItem.find('a:first-child').addClass "is-focused"
# Dropdown content scroll area
$dropdownContent = $listItem.closest('.dropdown-content')
diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss
index fe03c040e68..82dc1acbd01 100644
--- a/app/assets/stylesheets/framework/dropdowns.scss
+++ b/app/assets/stylesheets/framework/dropdowns.scss
@@ -104,14 +104,6 @@
padding: 0 10px;
}
- .is-focused {
- a {
- background-color: $dropdown-link-hover-bg;
- text-decoration: none;
- outline: 0;
- }
- }
-
.divider {
height: 1px;
margin: 8px 10px;
@@ -140,7 +132,8 @@
overflow: hidden;
&:hover,
- &:focus {
+ &:focus,
+ &.is-focused {
background-color: $dropdown-link-hover-bg;
text-decoration: none;
outline: 0;