1

I am using this script: https://github.com/PebbleRoad/combo-select

I've set it up, works great and lightweight. I want it to select the closest option(highlighted) on close(blur?) or submit - changing it's value to it. I noticed it already does this when punching numbers in the demo page: http://pebbleroad.github.io/combo-select/ however when it's words it does not work.

Similar bigger scripts like select2 or selectize already have a built-in feature but is much heaver with features I simply don't need. I tried using autoFocus as I believe it's part of the new jQuery library but it doesn't work.

$(function(){
  $('select')
  .comboSelect({ autoFocus: true })
})
Joe Landry
  • 21
  • 4
  • "Auto-select the selected option"? – Jack Bashford Mar 30 '19 at 05:34
  • this script shows a text-field which allows you to filter through the selectbox with matches. The closest match at the top is highlighted but not changed to if not clicked on, so basically I want to take that closest option and use it on close or submit – Joe Landry Mar 30 '19 at 05:38

0 Answers0