Select-or-Die
Select-or-Die copied to clipboard
select is not updated on tabing
If hte dropdown is selected but not folded out, and I navigate with arrow keys, the select is not updated when I tab. Only when I click enter.
It seems you can solve it like so
// Set $optionNext and $optionCycle if ( e.which === 37 || e.which === 38 ) { // Left/Up key console.log($optionActive) $optionNext = $optionActive.prevAll(":not('.disabled, .optgroup')").first(); $optionCycle = $sodOptions.not(".disabled, .optgroup").last();
if ( !$sod.hasClass("open") ) {
$optionNext.click();
}
}
else if ( e.which === 39 || e.which === 40 ) { // Right/Down key
$optionNext = $optionActive.nextAll(":not('.disabled, .optgroup')").first();
$optionCycle = $sodOptions.not(".disabled, .optgroup").first();
if ( !$sod.hasClass("open") ) {
$optionNext.click();
}
}