alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

When deselecting focus jumps to last selected option #148

Closed adamfeher closed 6 years ago

adamfeher commented 6 years ago

Consider an instance of the component with 50+ options displayed with multiple selection and deselection enabled.

If the user selects some options from the bottom of the select and selects options from the top, then the focus and this.lastUserSelectedOption is pointing to an option at the top of the dropdown.

Now, if the user scrolls down and wants to deselect multiple options from the bottom, the focus jumps back up to the top of the dropdown, This means that the user must scroll back down for every option they wish to deselect.

Would it be possible to not move focus to the last selected option on a deselect?

alsoscotland commented 6 years ago

@adamfeher My apologies. I didn't see this issue come through until today. I can take a look. I am not 100% sure what else that could effect

adamfeher commented 6 years ago

Not a problem. I understand some flow depends on that value and perhaps some assumptions based on it. This scenario is not 'breaking' in any sense, just usability is unfortunately poor.

alsoscotland commented 6 years ago

@adamfeher Thanks for the feedback. Agreed this is a poor Ui experience. I was able to remove the focus change and have not noticed any problems. Please give https://github.com/alsoscotland/react-super-select/tree/v1.0.15 a try.