mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 00:01:34 +00:00
fix(frontend): Prevent modal from hijacking all keypress event (#1136)
This commit is contained in:
@@ -12,13 +12,15 @@
|
||||
|
||||
function onKeyDown(event: KeyboardEvent) {
|
||||
if (open) {
|
||||
event.stopPropagation()
|
||||
event.preventDefault()
|
||||
switch (event.key) {
|
||||
case 'Enter':
|
||||
event.stopPropagation()
|
||||
event.preventDefault()
|
||||
dispatch('confirmed')
|
||||
break
|
||||
case 'Escape':
|
||||
event.stopPropagation()
|
||||
event.preventDefault()
|
||||
dispatch('canceled')
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user