Forums › Forums › Search & Filter Pro › Customise dropdown (combobox)
- This topic has 15 replies, 2 voices, and was last updated 6 years, 4 months ago by Anonymous.
-
Trevor(Private) June 15, 2018 at 10:22 am #180469
The default comobox script we use is Chosen, and what you would have seen before. The downside to Chosen is that it is old and does not play well with apple devices.
The behavior you see, where the dropdown opens, the cursor jumps in to the search field, and then out and focuses on the choices dropdown list, is standard behavior. Modifying this is difficult, because almost any solution you write either breaks on IE11, or breaks multi-select.
Anonymous(Private) June 15, 2018 at 10:28 am #180473Ok, so back to my original question.
I found /public/assets/js/chosen.jquery.js and moved “<div class=\”chosen-search\”>\n <input class=\”chosen-search-input\” type=\”text\” autocomplete=\”off\” />\n </div>\n” to right before “<div class=\”chosen-drop\”>” on row 587, and then made some CSS changes.
Will this be overwritten when I update the plugin? If so, where can I make these changes so they don’t get overwritten?
Trevor(Private) June 15, 2018 at 10:35 am #180475You would need to make a copy of the chosen script in your child theme folder and enqueue that from your child theme functions.php file.
In that same functions.php file, you would dequeue the original file, inside the same function as you enqueue your cutomised file. The EXTRA lines you would need are:
wp_dequeue_script( 'search-filter-chosen-script' ); wp_deregister_script( 'search-filter-chosen-script' );
The same goes for any CSS you make, it must not be by editing our CSS file, but instead in a new file (or any other method) that is not replaced on updates.
-
AuthorPosts