gregziegan / elm-autocomplete

Autocomplete for Elm apps; in Elm
http://package.elm-lang.org/packages/thebritican/elm-autocomplete/latest
BSD 3-Clause "New" or "Revised" License
173 stars 43 forks source link

Keyboard navigation does not scroll menu to keep selected item visible #38

Open fredcy opened 8 years ago

fredcy commented 8 years ago

To see the issue, modify AccessibilityExample.elm to set howManyToShow to 10. Then search for "e" which gets many matches and displays the menu with a scroll bar. Use the down-arrow key repeatedly to move the selection down. When the last displayed item is selected, hit down-arrow again. The next item's value does display in the input element but the menu does not scroll automatically to display the selected item.

Using up-arrow when the first element is selected is similar. The first press de-selects any element (which is fine). But the next press causes the last value (of the 10 total) to display in the input element but the menu itself does not scroll to reveal the selected element.

(Perhaps having a scrolling menu at all is out of scope. I think it could work well for my applications.)

gregziegan commented 8 years ago

Thanks for bringing this up! I'm going to do some research before this is re-released for 0.18 to see what other autocompletes do.

I'll update what I find out here!

amilner42 commented 7 years ago

Any news on this? Would really like to have this feature, as otherwise it's kinda confusing what happens when you go beyond the last item (or hit up arrow from the very top, then it just looks like nothing happens).