Select - Odd autoscroll behavior in Select
See original GitHub issueExpected Behavior
When onMore occurs and adds items to options
the user’s cursor should remain at the item index in the list on which they currently have focus.
Actual Behavior
An unexpected autoscroll occurs after an initial onMore is called, more data is loaded, and then the user moves their cursor. I will create a minimal code example which reproduces this experience and add it to this issue.
These are the steps which trigger the scroll behavior shown in the video below:
- Open modal containing a Select input.
- Click on Select dropdown to reveal the first set of options.
options
is initially populated with a list of 50 items. - Scroll down through the options to approximately the 75% point in the scrollbar to trigger the onMore call. onMore triggers a call to the API, retrieving the next 50 items adding them to
options
. Note: I did replicate the same behavior with an array, taking the next slice to remove the API call from the possible variables. - Stop scrolling. (in the video, the cursor is on the cursor is on “Hawaii” when this occurs at ~00:08).
- Note: The height of the scroll control reduces as the next 50 items are provided as options at 00:09.
- All is fine as long as the cursor remains on the currently active item (e.g. “Hawaii”).
- However, as soon as the cursor moves onto another item (00:12), which would become the next active index, the unexpected autoscroll occurs, skipping about 40 items and resolving at an item called “athena-f-2004200” at 00:14.
https://user-images.githubusercontent.com/1756948/179840901-03d32e29-2e37-458b-8d74-6d50458b1840.mov
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Odd Draggable Behavior After Implementing Auto Scroll
I'm using Chrome (22) and it seems to work for me. When I keep my dragged item in the top grey zone, it...
Read more >scroll-behavior - CSS: Cascading Style Sheets - MDN Web Docs
The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.
Read more >Issue with Automatic Scrolling in Drop Down Menus and ...
Click “Run programs made for previous versions of Windows” option from the list appeared in the left side. Select the drivers and install....
Read more >[Bug Report] V-Select scrolling behaviour · Issue #2660 - GitHub
Give the select component a largish number of items (anything above 50 will do). Open the select and start scrolling. Expected Behavior. The ......
Read more >making selections "under the fold" causes the grid to auto ...
When I click on the check that are below the scope of the window it causes the grid to auto scroll all the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Appears to have been introduced in https://github.com/grommet/grommet/pull/5934.
Autoscroll also occurs with keyboard. Additionally, at a certain point the keyboard is no longer able to reach item indexes less than ~25:
https://user-images.githubusercontent.com/1756948/179853121-78979b15-6bde-408e-95ac-de3d8bf2e47d.mov