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
Single selects reopen after selection in 4.0.6 #5490
Comments
Same happens here after upgrading to 2.0.6. With single select I'm unable to close the dropdown, it's just flickering and remains open. With multi-selects I can close it but it flickers after selecting an option, I don't remember of this happening before. |
@brunnopleffken it was introduced in 4.0.6 final. Anything upto 4.0.6-rc.1 is fine as far as this goes, but 4.0.5 is probably your safest bet. |
this issue is caused by https://github.com/select2/select2/blob/develop/src/js/select2/core.js#L280 this code, if you remove it all works good |
I came here to submit this issue after upgrading to 4.0.6, but it looks more people noticed it already. This issue didn't exist in 4.0.5 and 4.0.6 rc Here's the fiddle for @kevin-brown to see it in action - https://jsfiddle.net/japdL67z/ |
I can confirm this. I have the same issue. reopening on 'focus' causes this issue - like @Ariex mentioned |
I can also confirm this. |
That line (and lines surrounding it) were added in #5356. It's not clear why they were added, but I can tell from the jsfiddle provided (thanks!) that it means that Select2 just can't close anymore. |
@kevin-brown my understanding is that line could be added so people can use tag to switch to this control then the search box will show automatically, but without that line people can still do that only with an extra "enter" when the text box got the focus. Also with this change, people cannot switch out of this control with tab, they have to click anywhere in this control but the search text box, then "tab" twice to close the drop down. that change was introduced from this PR: 2ea1718#diff-770e771e3300e4531333cd08d3c2f8f1, and there is 1 related issues #3696 |
Same problem here after upgrading to 4.0.6 final. 4.0.6-rc.1 is fine for me. |
Confirm - 4.0.6 |
Confirm! |
Agreed, especially since I just re-reviewed that and it does not appear to solve the original problem. I welcome a pull request which reverts those changes, and I can roll a new 4.0.7 release after that is merged in. |
I just published a 4.0.7-rc.0 version to GitHub and NPM. If someone could confirm that it does in fact fix the issue (and that the regressions aren't catastrophic) on a real-world site that would be greatly appreciated. CDNs should be catching up shortly. |
works good for me |
4.0.6-rc.1 works for me. |
4.0.7-rc.0 works! |
@kevin-brown 4.0.7-rc.0 solves this issue indeed, but introduces #5495. |
I'm so happy to see Kevin continues developing select2 again. I believe it was kind if abandoned for a long time (4.0.6 RC was probably released more than a year ago?), and it's great to see the best select plugin is back! |
I confirm 4.0.7-rc.0 works fine for me |
4.0.7-rc.0 fixes this. |
Perhaps others can confirm but I still get unexpected/broken behaviour with 4.0.7. My single selects don't close on value select like they should. They won't close until a click outside the selectbox is done. Have tried setting closeOnSelect to true but this has no change. |
4.0.6-rc.1 works for me. |
This causes a flicker if
closeOnSelect
is on the defaulttrue
value, either implicit or explicit. SettingcloseOnSelect
tofalse
avoids the flicker, but is beside the point.Multi-selects work fine.
The text was updated successfully, but these errors were encountered: