mirror of
https://github.com/urbit/shrub.git
synced 2024-08-17 08:00:39 +03:00
fix esacape key on keyable overlay
This commit is contained in:
parent
14e06e9186
commit
c3327132ff
@ -258,14 +258,14 @@
|
||||
function handleKey(e) {
|
||||
let focused = document.activeElement;
|
||||
let textarea = ['TEXTAREA'].includes(focused.nodeName)
|
||||
let textinput = ['text', 'number', 'email', 'password'].includes(focused.getAttribute('type'));
|
||||
let textinput = ['text', 'number', 'email', 'password'].includes(focused.type);
|
||||
if (textarea || textinput) {
|
||||
if (e.key === 'Escape') {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (e.key === 'Escape') {
|
||||
else if (e.key === 'Escape') {
|
||||
closeEye();
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user