small fixes
This commit is contained in:
@@ -44,8 +44,10 @@ export function StepControls({
|
||||
// Keyboard shortcuts
|
||||
const handleKeyDown = useCallback(
|
||||
(e: KeyboardEvent) => {
|
||||
const tag = (e.target as HTMLElement).tagName;
|
||||
const el = e.target as HTMLElement;
|
||||
const tag = el.tagName;
|
||||
if (["INPUT", "TEXTAREA", "SELECT"].includes(tag)) return;
|
||||
if (el.closest("button, [role='button'], a")) return;
|
||||
|
||||
if (e.key === "ArrowRight" || e.key === " ") {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user