Skip to content

Commit

Permalink
fix: Prevent keyboard shortcuts from triggering in input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
NriotHrreion committed Jan 4, 2025
1 parent ece1a89 commit 4cb526a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/panel/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export class Panel extends Component<HTMLDivElement, PanelOptions> implements IP
}));

document.body.addEventListener("keydown", (e) => {
if(e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;

const code = e.key.charCodeAt(0);

if(code >= 48 && code <= 57) { // 0-9
Expand Down

0 comments on commit 4cb526a

Please sign in to comment.