-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Steps to reproduce on official demo:
- Click on Multiple Select field.
- 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.