feat(web): manage initial focus for force run modal and filter add form (#1713)

* feat(web): manage initial focus for force run modal

* refactor(web): manage initial focus for force run modal

* feat(web): manage initial focus on FilterAddForm.tsx
This commit is contained in:
martylukyy 2024-09-11 15:54:34 +02:00 committed by GitHub
parent e603b262f7
commit 00b5728b4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -163,7 +163,6 @@ export const ForceRunModal: FC<ForceRunModalProps> = (props: ForceRunModalProps)
as="div"
static
className="fixed z-10 inset-0 overflow-y-auto"
initialFocus={props.buttonRef}
open={props.isOpen}
onClose={handleClose}
>
@ -183,6 +182,7 @@ export const ForceRunModal: FC<ForceRunModalProps> = (props: ForceRunModalProps)
<div className="bg-gray-50 dark:bg-gray-800 px-4 py-3 sm:px-6 flex justify-center">
<input
type="text"
data-autofocus
className="w-96 shadow-sm sm:text-sm rounded-md border py-2.5 focus:ring-blue-500 dark:focus:ring-blue-500 focus:border-blue-500 dark:focus:border-blue-500 border-gray-400 dark:border-gray-700 bg-gray-100 dark:bg-gray-900 dark:text-gray-100"
placeholder="Type 'I understand' to enable the button"
value={inputValue}