I'm coding in rails and using Stimulus to connect views and javascript. For handling dropdowns, I'm using choices.js, which is an old library and not well supported atm. The issue that I currently have is, when I select an option from dropdowns, while part of dropdown is out of screen, the option is got selected and the page automatically scrolls down. It seems to me, when the half of the options goes off from the bottom of the screen and I'm selecting the top option the browser scrolls down to show/fit the whole dropdown for the next time! To be more clear, after scrolling if I click on dropdown again, the whole list is visible then. This automatic scrolling is not preferable for me. I tried to add scrolling back on choice event but it didn't work. I'm wondering if there is any css or javascript solution for it or not.
I would advise you to go with alpine.js
This way you can use all basic ( even somewhat advanced ) interactions without too much code.
In combination with Tailwind CSS2 you will have a good combo.