mirror of
https://github.com/nunntom/elm-ui-select.git
synced 2024-11-22 21:19:26 +03:00
Prevent default on Enter and add type=button to clear button element
This commit is contained in:
parent
7f024743db
commit
a89ff160d0
@ -251,6 +251,7 @@ clearButtonElement onChange attribs element =
|
||||
, Css.batch attribs
|
||||
]
|
||||
, Attributes.tabindex -1
|
||||
, Attributes.type_ "button"
|
||||
, Events.onClick (onChange ClearButtonPressed)
|
||||
]
|
||||
[ element ]
|
||||
|
@ -29,7 +29,7 @@ hijackKey :
|
||||
hijackKey menuOpen tagger key =
|
||||
{ message = tagger key
|
||||
, stopPropagation = menuOpen && key == "Escape"
|
||||
, preventDefault = List.member key [ "ArrowUp", "ArrowDown", "PageUp", "PageDown" ]
|
||||
, preventDefault = List.member key [ "ArrowUp", "ArrowDown", "PageUp", "PageDown", "Enter" ]
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user