Skip to content

Commit

Permalink
Fix Tab sur les inputs avec masque
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Jul 12, 2024
1 parent 2abe617 commit fab3980
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/forms/src/components/utils/mask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,16 @@ export function useMask({
if (isCut) {
navigator.clipboard.writeText(selectedText);
}
} else if (!(e.metaKey || e.altKey || e.ctrlKey || e.key === "Enter" || e.key.startsWith("Arrow"))) {
} else if (
!(
e.metaKey ||
e.altKey ||
e.ctrlKey ||
e.key === "Enter" ||
e.key === "Tab" ||
e.key.startsWith("Arrow")
)
) {
e.preventDefault();
result = input(e.key || (e as any).data, characters, selection);
}
Expand Down

0 comments on commit fab3980

Please sign in to comment.