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
Wrap <select> with <label>. You should get sth like:
<label> Your Label <select id='test' multiple> <option>a</option> <option>b</option> <option>c</option> </select> </label>
3. Enable Chosen on this select.
4. Select some option clicking with mouse on dropdown
5. There should appear selected option in Chosen field and cursor to write sth more (it's multiselect).
6. If you try to write sth now on key up it will disappear.
I think this is because a click on the select propagates to the label, which then focusses the select, which in turn focusses Chosen, which queues some invocation of input_focus.
To see this in action, open the live demo, open the web inspector, set a breakpoint in chosen.jquery.js on line 195, and follow the above reproduction steps.
Steps to reproduce
<select multiple>
element on your site.<select>
with<label>
. You should get sth like:<label>
Your Label
<select id='test' multiple>
<option>a</option>
<option>b</option>
<option>c</option>
</select>
</label>
3. Enable Chosen on this select.
4. Select some option clicking with mouse on dropdown
5. There should appear selected option in Chosen field and cursor to write sth more (it's multiselect).
6. If you try to write sth now on key up it will disappear.
Here is live demo to this case:
https://jsfiddle.net/xkysq3bq/
Expected behavior
The written text should not disappear, but should be searched in dropdown
Actual behavior
The text disappears. You have to write it once again, after the dropdown is opened, to work.
Environment
Additional information
The problem does not happen when you use label with "for" and the select is not inside.
The text was updated successfully, but these errors were encountered: