krazedkrish / select-multiple

"An awesome user-friendlier drop-in replacement for the standard select with multiple attribute activated.
MIT License
76 stars 20 forks source link

SpaceBar not working #16

Open zhbzhbzhbz opened 7 years ago

zhbzhbzhbz commented 7 years ago

I use Chrome. Assuming that I pressed SpaceBar, then the blue cover dismissed(unselected), then I pressed Up/Down, but the selected item will be the first one or the last one... Thank you~

zhbzhbzhbz commented 7 years ago

I temporarily fixed this bug in JS file occasionally... But I don't know whether there are any unknown bugs in it. Firstly, insert the code after Line 181

case 32:
    e.preventDefault();
    e.stopPropagation();
    that.selectHighlighted($list);
    return;

Secondly, remove the code at Line 276; Thirdly(Optional), remove the code at Line 283~285. This change can make ↑/↓ always available no matter where the mouse is going to.