Merge pull request #29 from notriddle/patch-1
Fix the escape key when running under IE11
This commit is contained in:
Коммит
0612fe4af0
2
index.js
2
index.js
|
@ -24,7 +24,7 @@ function autofocus(el: DetailsDialogElement): void {
|
|||
function keydown(event: KeyboardEvent): void {
|
||||
const details = event.currentTarget
|
||||
if (!(details instanceof Element)) return
|
||||
if (event.key === 'Escape') {
|
||||
if (event.key === 'Escape' || event.key === 'Esc') {
|
||||
toggleDetails(details, false)
|
||||
event.stopPropagation()
|
||||
} else if (event.key === 'Tab') {
|
||||
|
|
Загрузка…
Ссылка в новой задаче