rosnovsky / sanity-plugin-autocomplete-tags

Creatable autocomplete tag dropdown input fields for Sanity Studio 🤓
MIT License
24 stars 7 forks source link

[BUG] Tag dropdown unusable when preceding a sanity text field #15

Open zanedev opened 3 years ago

zanedev commented 3 years ago

Describe the bug A tag field dropdown is not scrollable/usable when it is placed before a text field, instead the text field click to activate is triggered stopping it from using the dropdown selector scrolling or clicking.

To Reproduce Add a text field after a tags field with enough tags to show the dropdown to choose existing tags. Note you will not be able to scroll or choose a tag in the dropdown that hovers over the text field.

Expected behavior Should be able to scroll the dropdown and use it over a text field

Screenshots image

Browser-specific? No

rosnovsky commented 2 years ago

Looking into it! I bet it has something to do with poor element focusing thingy (https://github.com/rosnovsky/sanity-plugin-autocomplete-tags/blob/6448eeabe7932669dbf63621d2f911646eb0bb2d/src/components/autocompleteTagsComponent.js#L37)