Attach "chosen" to dropdowns correctly

This commit is contained in:
Nabil Kadimi
2019-02-25 15:24:19 +00:00
committed by GitHub
parent a65b29015c
commit 699a5cc0b8

View File

@@ -14,13 +14,16 @@ jQuery(document).ready(function($){
});
// Chosen select
$(".chosen-select").chosen({
allow_single_deselect: true,
search_contains: true,
single_backstroke_delete: false,
disable_search_threshold: 10,
placeholder_text_multiple: localized_strings.none
});
$(document).on("postbox-toggled", function() {
$(".chosen-select").filter(":visible").chosen({
allow_single_deselect: true,
search_contains: true,
single_backstroke_delete: false,
disable_search_threshold: 10,
placeholder_text_multiple: localized_strings.none
});
}).trigger("postbox-toggled");
// Auto key placeholder
$("#poststuff #title").on("keyup", function() {
@@ -886,4 +889,4 @@ jQuery(document).ready(function($){
// Trigger box score time converter
$('.sp-convert-time-input').change();
});
});