Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown menu fixes #8564

Merged
merged 2 commits into from
Apr 15, 2016
Merged

Dropdown menu fixes #8564

merged 2 commits into from
Apr 15, 2016

Conversation

Owlbertz
Copy link
Contributor

@Owlbertz Owlbertz commented Apr 9, 2016

Fix for detection of overfloating dropdown menus.
Fixes #8555.
Also fixes the behavior for keyboard navigation with vertical menus.

Fixed keyboard interaction for dropdown menu.
Addresses #8480 (comment).
Added test cases for this, the second menu bar reflects the changes made in this PR.

Because the selectors were not specific enough, the styles of .opens-right set by the JS in case of an overflowing sub-menu was overwritten by the parent's .open-left styles.
Added visual tests to check for this. The tests include two cases: one for a right aligned dropdown using `.top-bar-right` (which was fixed earlier already) and one that is positioned right because of content (where this fix can be tested).
Also added anchors to the menu's links to check for correct behavior of the links, e.g. when using keyboard.
Fixes behaviour for vertical menus to be correct (switch left/right with up/down compared to horizontal menus).
Fixed usage of `e.preventDefault()` to enable opening of links in the menu.
@bergschrat
Copy link

I think, the arrows are still in the wrong direction. see:
http://codepen.io/Owlbertz/pen/qZpwex

@kball
Copy link
Contributor

kball commented Apr 15, 2016

This looks good as a JS fix.

@kball kball merged commit 5ccecdc into foundation:develop Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dropdown Menu] 'enter' keyboard press does not follow link
4 participants