css - Select2 takes 2 clicks to remove focus from a search field -
the client has asked restyling select2 inputs suit rest of design, overwrote default css custom 1 using sass.
it's complicated rather won't paste here...
i haven't touched original javascript nor tried overwrite takes 2 clicks outside multiple select box blur input field. first 1 removes ".select2-container-active" class parent div , shrinks input field 10px width leaves blinking caret. second 1 blurs it.
there 2 related issues: "half focused" caret bigger suppose , width of input field dynamically "hardcoded" via style attribute maximum when start typing, causes jumping in new row.
any ideas or look?
this did make changes (this problem faced me in ipad version of website)
just copy paste works select tag.
you need remove select2-container-active , blur ":focus"
$('select').select2().on("select2-close", function () { settimeout(function() { $('.select2-container-active').removeclass('select2-container-active'); $(':focus').blur(); }, 1); });
Comments
Post a Comment