2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

fix(ui/ux): prevent shorcuts in input

- border on Toast
This commit is contained in:
18alantom 2023-07-14 12:02:14 +05:30 committed by Alan
parent aeaddc30a4
commit dbbe4fe9de
2 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,7 @@
z-30
bg-white
rounded-lg
border
"
style="pointer-events: auto"
>

View File

@ -31,6 +31,13 @@ export function useKeys() {
});
const keydownListener = (e: KeyboardEvent) => {
if (
e.target instanceof HTMLInputElement &&
!(e.altKey || e.metaKey || e.ctrlKey)
) {
return;
}
keys.alt = e.altKey;
keys.ctrl = e.ctrlKey;
keys.meta = e.metaKey;