Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
8a26268c
Commit
8a26268c
authored
8 years ago
by
Pierre-Denis Vanduynslager
Browse files
Options
Download
Email Patches
Plain Diff
Dropdown: remove dependency to role="menu", role="listbox", li and a elements
parent
b479efb9
1 merge request
!19864
Dropdown: remove dependency to role="menu", role="listbox" a and li elements => fix keyboard navigation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/src/dropdown.js
+3
-6
js/src/dropdown.js
with
3 additions
and
6 deletions
+3
-6
js/src/dropdown.js
+
3
-
6
View file @
8a26268c
...
...
@@ -44,11 +44,9 @@ const Dropdown = (($) => {
BACKDROP
:
'
.dropdown-backdrop
'
,
DATA_TOGGLE
:
'
[data-toggle="dropdown"]
'
,
FORM_CHILD
:
'
.dropdown form
'
,
ROLE_MENU
:
'
[role="menu"]
'
,
ROLE_LISTBOX
:
'
[role="listbox"]
'
,
MENU
:
'
.dropdown-menu
'
,
NAVBAR_NAV
:
'
.navbar-nav
'
,
VISIBLE_ITEMS
:
'
[role="menu"] li:not(.disabled) a,
'
+
'
[role="listbox"] li:not(.disabled) a
'
VISIBLE_ITEMS
:
'
.dropdown-menu .dropdown-item:not(.disabled)
'
}
...
...
@@ -268,8 +266,7 @@ const Dropdown = (($) => {
$
(
document
)
.
on
(
Event
.
KEYDOWN_DATA_API
,
Selector
.
DATA_TOGGLE
,
Dropdown
.
_dataApiKeydownHandler
)
.
on
(
Event
.
KEYDOWN_DATA_API
,
Selector
.
ROLE_MENU
,
Dropdown
.
_dataApiKeydownHandler
)
.
on
(
Event
.
KEYDOWN_DATA_API
,
Selector
.
ROLE_LISTBOX
,
Dropdown
.
_dataApiKeydownHandler
)
.
on
(
Event
.
KEYDOWN_DATA_API
,
Selector
.
MENU
,
Dropdown
.
_dataApiKeydownHandler
)
.
on
(
Event
.
CLICK_DATA_API
,
Dropdown
.
_clearMenus
)
.
on
(
Event
.
CLICK_DATA_API
,
Selector
.
DATA_TOGGLE
,
Dropdown
.
prototype
.
toggle
)
.
on
(
Event
.
CLICK_DATA_API
,
Selector
.
FORM_CHILD
,
(
e
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets