mousemke / flounder

Style-able dropdown replacement for native dropdowns
MIT License
9 stars 10 forks source link

[Events] Searchbox should not get focused onOpen when “openOnHover” is set #177

Open conor-cafferkey-sociomantic opened 6 years ago

conor-cafferkey-sociomantic commented 6 years ago

Currently

Given a Flounder with search: true the seachbox always gets focused onOpen.

Problem

When openOnHover is also true the searchbox gets focused on hover.

Wanted

The searchbox should not get focused when Flounder is hovered (should only happen on click or key press).

mousemke commented 5 years ago

what is the benefit of not focusing here? this actually leads to some inconsistent behavior (since we need to focus on the native side of flounder anyways

UX issue?

conor-cafferkey-sociomantic commented 5 years ago

So the issue here is that Flounder it steals the focus just because you happened to mouse over it (it might not even have been an intentional mouse over). I wouldn’t say that this is a huge issue but it’s a kinda weird behavior imo.

mousemke commented 5 years ago

so. i see that issue; i actually have this issue fixed locally but it presents another issue. focus is just weird. flounder focus' not on the div but on the native select when clicked or in this case hovered. if there is a search box it focus' instead on the search

without search focus it will still focus on the select element for native compatibility. without focusing on the select we lose naive

mousemke commented 5 years ago

we could make a note of the focused element onHover, then return to that. but given that we dont know what that element will be, it feels unwise