You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter "xxx" or anything else to get a "No results" message.
Click on the far right side of the field (or on "No results" message).
Focus is lost and clicking on a field won't make it focused anymore. The only way to get focus back is to click right on text, not just on the field itself.
In reality there are more cases when this issue can be reproduced.
This happens because width of input in .search-field is smaller than width of .chosen-choices. When you click outside input field the blur.chosen event happens but function AbstractChosen.prototype.input_blur doesn't proceed because this.mouse_on_container is set to true at this moment. This is the only place where this.mouse_on_container is actually checked and I couldn't find any good reason why it's required. Can you guys shed some light on why this is needed?
Without this check blur event does its job of setting active_field to true, and then adding else condition in choices_click with this.input_focus(); fixes this issue. I'll be happy to create a pull request with a fix.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #1729, allegedly solved by this (unmerged) PR: #1731
Closing this as a duplicate of that, but please let me know if I'm misreading and this is different and I'll reopen. Otherwise, please leave your feedback on those tickets.
Steps to reproduce on official demo:
In reality there are more cases when this issue can be reproduced.
This happens because width of input in
.search-field
is smaller than width of.chosen-choices
. When you click outside input field theblur.chosen
event happens but functionAbstractChosen.prototype.input_blur
doesn't proceed becausethis.mouse_on_container
is set totrue
at this moment. This is the only place wherethis.mouse_on_container
is actually checked and I couldn't find any good reason why it's required. Can you guys shed some light on why this is needed?Without this check blur event does its job of setting
active_field
totrue
, and then addingelse
condition inchoices_click
withthis.input_focus();
fixes this issue. I'll be happy to create a pull request with a fix.The text was updated successfully, but these errors were encountered: