gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Dragging scrollbar on `FormTokenField` suggestions list does not work

Open amiut opened this issue 3 years ago • 2 comments

Description

When adding <FormTokenField /> component with __experimentalExpandOnFocus prop, and add enough number of suggestions that makes the list scrolled, while scrolling functionality works fine by mousewheel, It does not work when dragging the scrollbar or clicking the up/down scroll arrows (In microsoft Windows), the scrollbar doesn't move and if you already have scrolled with mouse wheel it will jump to the beginning of the list.

Also reproducible in StoryBook: https://wordpress.github.io/gutenberg/?path=/docs/components-formtokenfield--dropdown-selector

Step-by-step reproduction instructions

  1. Insert a <FormTokenField /> with __experimentalExpandOnFocus enabled.
  2. Add enough number of suggestions so that the list gets scrolled.
  3. Click the input so the suggestions list gets expanded.
  4. Drag the scrollbar and/or if you are on Windows click the down/up arrows.

Screenshots, screen recording, code snippet

this behavior can be seen in this recorded screencast.

https://github.com/WordPress/gutenberg/assets/25235298/d6055b9c-a576-477e-be3f-de8eaf38a989

However this will work fine If you type something in the search input and the list focus gets locked.

https://github.com/WordPress/gutenberg/assets/25235298/e6aa44de-fb01-44a0-a251-e355d5541dc3

Environment info

  • Wordpress 6.2
  • Tested on Firefox Developer edition 114, Microsoft Edge 110, Chrome Canary 115
  • Desktop with OSx 13.2.1 + multiple other browser / operating systems on BrowserStack.com

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

amiut avatar May 10 '23 12:05 amiut

I stumbled on the same problem (WP 6.3). I hope someone will be able to find the cause and fix this.

bvlgn avatar Aug 23 '23 16:08 bvlgn

You can test this bug here:

https://wordpress.github.io/gutenberg/?path=/story/components-formtokenfield--dropdown-selector

Please notice that you won't be able to drag the scrollbar due to this bug.

bvlgn avatar Aug 24 '23 10:08 bvlgn