diff --git a/library/package.json b/library/package.json index f0baedc..fd78911 100644 --- a/library/package.json +++ b/library/package.json @@ -1,6 +1,6 @@ { "name": "@irontec/ivoz-ui", - "version": "1.7.0", + "version": "1.7.1", "description": "UI library used in ivozprovider", "license": "GPL-3.0", "main": "index.js", diff --git a/library/src/components/shared/ConfirmDialog.tsx b/library/src/components/shared/ConfirmDialog.tsx index 48c8747..f3fbc37 100644 --- a/library/src/components/shared/ConfirmDialog.tsx +++ b/library/src/components/shared/ConfirmDialog.tsx @@ -53,6 +53,12 @@ export default function ConfirmDialog(props: ConfirmDialogProps): JSX.Element { [] ); + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === 'Tab') { + event.stopPropagation(); + } + }; + const sumbitEnabled = !doubleCheck || inputVal == doubleCheckExpectedStr; return ( @@ -63,6 +69,7 @@ export default function ConfirmDialog(props: ConfirmDialogProps): JSX.Element { onClose={handleClose} aria-labelledby='alert-dialog-slide-title' aria-describedby='alert-dialog-slide-description' + onKeyDown={handleKeyDown} > diff --git a/library/src/components/shared/ConfirmEditDialog.tsx b/library/src/components/shared/ConfirmEditDialog.tsx index 493c7fa..52856d9 100644 --- a/library/src/components/shared/ConfirmEditDialog.tsx +++ b/library/src/components/shared/ConfirmEditDialog.tsx @@ -36,6 +36,12 @@ export const ConfirmEditionDialog = (props: ConfirmEditDialogProps) => { const TOTAL_TIME = 100; const [progress, setProgress] = useState(TOTAL_TIME); + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === 'Tab') { + event.stopPropagation(); + } + }; + useEffect(() => { let timer: NodeJS.Timeout | null = null; if (open) { @@ -64,6 +70,7 @@ export const ConfirmEditionDialog = (props: ConfirmEditDialogProps) => { TransitionComponent={Transition} keepMounted onClose={handleClose} + onKeyDown={handleKeyDown} aria-labelledby='alert-dialog-slide-title' aria-describedby='alert-dialog-slide-description' >