Skip to content

Multi select with Chosen enabled in label deletes letters #2613

Open
@Eisermann

Description

@Eisermann

Steps to reproduce

  1. Create <select multiple> element on your site.
  2. 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.

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

  • Tested on: 1.4, 1.5
  • jQuery: 1.7.1
  • Chrome (the newest)
  • Ubuntu 16 LTS

Additional information

The problem does not happen when you use label with "for" and the select is not inside.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions