Don't toggle dropdown on space

Closing the dropdown menu is now possible with ESC. Space will only
open the dropdown, but not close it. So now it's possible to type a
space into the search field.

Fixes: #863
This commit is contained in:
eikek 2021-06-09 22:18:18 +02:00
parent f06d10d7f7
commit bf74e3aa23

View File

@ -359,7 +359,7 @@ update msg model =
Just Util.Html.ESC ->
if model.menuOpen then
( model, Cmd.none )
update ToggleMenu model
else
case model.selected of
@ -374,7 +374,11 @@ update msg model =
( model, Cmd.none )
Just Util.Html.Space ->
update ToggleMenu model
if model.menuOpen then
( model, Cmd.none )
else
update ToggleMenu model
Just Util.Html.Enter ->
let