allows for keydown to run even if not composed
this should not happen regardless, but is saferpull/33/head
parent
61f2e40e3b
commit
f949a4a932
|
|
@ -220,10 +220,12 @@ gradioApp().addEventListener("keydown", function(event) {
|
|||
}
|
||||
|
||||
// If the user is typing in an input field, dont listen for keypresses
|
||||
let target;
|
||||
if (!event.composed) { // We shouldn't get here as the Shadow DOM is always active, but just in case
|
||||
return;
|
||||
target = event.target;
|
||||
} else {
|
||||
target = event.composedPath()[0];
|
||||
}
|
||||
let target = event.composedPath()[0];
|
||||
if (!target || target.nodeName === "INPUT" || target.nodeName === "TEXTAREA") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue