This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Page Up/Down work oddly in dropdowns without scrollbars #8433
Comments
Also, if you skip step 2 and thus have nothing highlighted initially, step 3 always highlights the last item in the list on first keypress, regardless of whether you pressed Page Up or Page Down... which also feels weird. |
Btw, Home/End doesn't even work in dropdowns right now. |
After playing with this a bit, I think the right answer here is to make Page Up/Down not wrap around the edges of the list -- they should just clip and stop at whatever end they're headed toward. The overshoot you get from wrapping is weird, and I can't find any other app where they wrap at all. If we make that change, it would also make PgUp/Dn automatically act like Home/End in the no-scrollbar case, which I think is good. |
peterflynn
added a commit
that referenced
this issue
Jul 18, 2014
…e doc's current language is already the default (i.e. there's no path-specific override). DropdownButton changes: * Support disabled items * Fix bug #8433 (Page Up/Down work oddly) - Only wrap around to other end of list when using arrow keys. Page Up/Down 'stick' at start/end of list instead (so they will act like Home/End when there's no scrollbar). * Add Home/End key support
Fixed now that PR #8444 has landed |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Result: Selection alternates between the first and last item in the list forever. Nothing else ever gets selected.
Expected: Either do nothing or act like Home/End instead of jumping around (the latter is how native dropdowns appear to work on Windows).
Side note -- it also looks like
DropdownEventHandler._itemsPerPage()
won't work right when there are any dividers in the list (indeed, you can't return a single result that's true for all "pages" of items, since their height isn't constant). The only dropdowns we currently use dividers on are too short to scroll, but that's not guaranteed forever -- so we might want to clean up the other Page Up/Down codepath too...The text was updated successfully, but these errors were encountered: