gregziegan / elm-autocomplete

Autocomplete for Elm apps; in Elm
http://package.elm-lang.org/packages/thebritican/elm-autocomplete/latest
BSD 3-Clause "New" or "Revised" License
173 stars 43 forks source link

blur does not hide the menu #14

Closed vschoettke closed 8 years ago

vschoettke commented 8 years ago

In version 3.01 (with elm 0.17) the menu is not hidden if the focus is removed. Selecting an item still hides the menu so I guess the "onBlur" in the div is not working anymore.

gregziegan commented 8 years ago

Yes, this is an issue with the virtualdom Elm implementation. didn't realize it was a problem here as well as in #13. Thanks for letting me know!

demsullivan commented 8 years ago

I saw that this was resolved using an onBlur event, then subsequently changed to handle it a different way... though using 3.2.0 the menu isn't going away on blur for me.

gregziegan commented 8 years ago

@demsullivan thanks for the catch! I was manually testing and missed this! Solved Esc, but not blur. 3.2.1 should have the fix. click events fire after blur (on release of the mouse), onMouseDown will allow the input to still be filled in when selecting a menu item with the mouse.

This just means: time to write some tests! 😅