Reset focus on escape

This commit is contained in:
Chris McCord 2021-11-18 16:17:47 -05:00
parent a643ca9fe5
commit 7d8e1f2ec6

View file

@ -56,6 +56,7 @@ Hooks.Menu = {
onKeyDown(e){
if(e.key === "Escape"){
document.body.click()
this.el.focus()
this.reset()
} else if(e.key === "Enter" && !this.activeItem){
this.activate(0)