1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Prevent terminal to fire custom event

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-09-16 15:25:55 +03:00
parent 0a0c156e98
commit 8c88ce8e7d

View File

@ -199,7 +199,7 @@ export class Terminal {
};
keyHandler = (evt: KeyboardEvent): boolean => {
const { code, ctrlKey, type, metaKey } = evt;
const { code, ctrlKey, metaKey } = evt;
// Handle custom hotkey bindings
if (ctrlKey) {
@ -225,11 +225,6 @@ export class Terminal {
}
}
// Pass the event above in DOM for <Dock/> to handle common actions
if (!evt.defaultPrevented) {
this.elem.dispatchEvent(new KeyboardEvent(type, evt));
}
return true;
};
}