New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll back to the input field when lost focus (after select2:closing) #4983
Comments
+1 This is really bad UX. If user scrolls and place his focus inside other form field, the screen will be scrolled back where select2 element is. Commenting out this line select2/dist/js/select2.full.js Line 1407 in 04d5821
|
I can reproduce this behavior. I'm kind of confused though, because #4971 seems to be saying the exact opposite thing. |
I feel pretty confident that it should not auto-focus after programatic deselect: if the developer wants to deselect and focus back then I feel they should call both in a row. |
I have confirmed that this issue is still present in 4.0.4. |
This actually appears to be a duplicate of #3663. |
Prerequisites
master
branch of Select2Steps to reproduce the issue
There is jsfiddle with complete example page: https://jsfiddle.net/1hw1250x/
Expected behavior and actual behavior
When I follow those steps, I see the page is scrolled to the top (where select2 element is present)
I was expecting not to scroll and still see gray square
Environment
Browsers
Operating System
Libraries
Isolating the problem
The text was updated successfully, but these errors were encountered: