On container mousedown, make sure to compare the appropriate element.
Fixes #350.
This commit is contained in:
parent
31cd33f22b
commit
5808c97172
|
@ -390,7 +390,7 @@
|
||||||
}
|
}
|
||||||
$(document).click(this.click_test_action);
|
$(document).click(this.click_test_action);
|
||||||
this.results_show();
|
this.results_show();
|
||||||
} else if (!this.is_multiple && evt && ($(evt.target) === this.selected_item || $(evt.target).parents("a.chzn-single").length)) {
|
} else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chzn-single").length)) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
this.results_toggle();
|
this.results_toggle();
|
||||||
}
|
}
|
||||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -113,7 +113,7 @@ class Chosen extends AbstractChosen
|
||||||
@search_field.val "" if @is_multiple
|
@search_field.val "" if @is_multiple
|
||||||
$(document).click @click_test_action
|
$(document).click @click_test_action
|
||||||
this.results_show()
|
this.results_show()
|
||||||
else if not @is_multiple and evt and ($(evt.target) is @selected_item || $(evt.target).parents("a.chzn-single").length)
|
else if not @is_multiple and evt and (($(evt.target)[0] == @selected_item[0]) || $(evt.target).parents("a.chzn-single").length)
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
this.results_toggle()
|
this.results_toggle()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue