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

Menu scrolls unexpectedly when selecting next/previous item #63

Open
mgiuffrida opened this issue Jun 12, 2016 · 2 comments
Open

Menu scrolls unexpectedly when selecting next/previous item #63

mgiuffrida opened this issue Jun 12, 2016 · 2 comments

Comments

@mgiuffrida
Copy link
Contributor

Fiddle: https://jsfiddle.net/ntw6trbk/

  1. Focus any one of the 3 menus (tap "Item 0" or tap the dropdown trigger).
  2. Press the down arrow 5 or so times.

Expected

Once the selection is at the bottom of the visible menu container, Down should scroll the menu down by one, so the selection is always at the bottom. (select)

Actual

Every 5 or so element, the menu scroll position jumps so the selected item is in the middle of the visible menu container instead of the bottom. (paper-menu, paper-listbox)

This is particularly disorienting when the list wraps, because it's not immediately obvious that it isn't just continuing the "move downward, scroll upward" behavior.

Also repros with the down arrow (selection should always be at the top, but the menu scrolls up occasionally).

@bicknellr
Copy link
Contributor

bicknellr commented Jun 13, 2016

It seems like this is a result of the default focus behavior: http://output.jsbin.com/duzipo

@bicknellr
Copy link
Contributor

scrollIntoView seems like it would help here. The general lack of scrollIntoViewOptions support is lame though.

bicknellr added a commit that referenced this issue Jun 15, 2016
bicknellr added a commit that referenced this issue Jun 15, 2016
bicknellr added a commit that referenced this issue Jun 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants