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

Keyboard navigation not working #1

Open MojoDK opened 9 years ago

MojoDK commented 9 years ago

(I'm using latest version of Google Chrome)

Pressing down arrow makes the slection randomly jump to the top.

Here in this screencast, I just keep pressing down key:

http://www.screencast.com/users/Mojodk/folders/Snagit/media/8272a34a-d2c2-441c-a419-2fdd794d807b/embed

krazedkrish commented 9 years ago

Hello MojoDK, I am sorry for late reply, have been very busy since last 13 days. I will work on it when I am free. :)

Thanks for posting the issue.

MaitreVaxor commented 8 years ago

Hi krazedkrish,

I think the issue is still valid. Any chance you could have a look on it? :-)

Thanks, Xavier.

MaitreVaxor commented 8 years ago

Hi again,

I just made some tests and it seems it's related to the fact the element needs to have the focus so key mapping properly works (even is not triggered if no focus). So this is something users can fix by calling the Jquery focus() function on the list when displaying the list. For me, it looks like: $("#filterzone"+filter_name+ " .ms-list").focus(); filter_zone_xxx being the container of my list. Yet please note that there is still an issue if you have your mouse arrow on your list while using keyboard (similar to the one described above). Also, as a side note, I removed $elems.removeClass('ms-hover'); from the function selectHighlighted to be able to select multiple elements with space bar without losing focus.

Thanks, Xavier.