diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/confirmDeleteModal.tsx b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/confirmDeleteModal.tsx index f98da1f72223..1161b3cecb2f 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/confirmDeleteModal.tsx +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/confirmDeleteModal.tsx @@ -38,7 +38,18 @@ export default function ConfirmDeleteModal(props: ConfirmDeleteModalProps) { return ( -
+
{ + element?.focus() + }} + tabIndex={-1} + className="relative rounded-2xl pointer-events-auto" + onKeyDown={event => { + if (event.key !== 'Escape') { + event.stopPropagation() + } + }} + >
{ diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/managePermissionsModal.tsx b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/managePermissionsModal.tsx index f3848fdcbcbd..33b717ca02e9 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/managePermissionsModal.tsx +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/managePermissionsModal.tsx @@ -232,6 +232,10 @@ export default function ManagePermissionsModal(props: ManagePermissionsModalProp className="absolute overflow-hidden bg-dim w-full h-full top-0 left-0 z-10" >
{ + element?.focus() + }} + tabIndex={-1} style={ position != null ? { @@ -248,6 +252,11 @@ export default function ManagePermissionsModal(props: ManagePermissionsModalProp mouseEvent.stopPropagation() mouseEvent.preventDefault() }} + onKeyDown={event => { + if (event.key !== 'Escape') { + event.stopPropagation() + } + }} >