From 61b96ca6c4a1594c83864b1104310b4d1ac0b9de Mon Sep 17 00:00:00 2001 From: LoV432 Date: Sat, 4 Nov 2023 22:55:29 +0500 Subject: [PATCH] firefox-fix-test --- app/components/user-cards/UserCard.client.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/components/user-cards/UserCard.client.tsx b/app/components/user-cards/UserCard.client.tsx index 3b5c761..61af74b 100644 --- a/app/components/user-cards/UserCard.client.tsx +++ b/app/components/user-cards/UserCard.client.tsx @@ -227,14 +227,17 @@ function NameChangePopUp({ setChangeNamemodalIsOpen(false); } useEffect(() => { - changeNameModal.current?.showModal(); + (async () => { + await new Promise((resolve) => setTimeout(resolve, 10)); + changeNameModal.current?.showModal(); + changeNameValue.current?.focus(); + })(); }, []); return (

Enter New Name

{ if (e.key === 'Enter') { changeName(); @@ -291,8 +294,9 @@ function ChangeIndexPopUp({ } useEffect(() => { (async () => { - await new Promise((resolve) => setTimeout(resolve, 1)); + await new Promise((resolve) => setTimeout(resolve, 10)); setChangeIndexModal.current?.showModal(); + changeIndexValue.current?.focus(); })(); }, []); return ( @@ -300,7 +304,6 @@ function ChangeIndexPopUp({

Enter New Index

{ if (e.key === 'Enter') { changeIndex(); @@ -355,7 +358,7 @@ function DeleteDevicePopUp({ useEffect(() => { (async () => { - await new Promise((resolve) => setTimeout(resolve, 1)); + await new Promise((resolve) => setTimeout(resolve, 10)); deleteDeviceModal.current?.showModal(); })(); }, []); @@ -411,7 +414,7 @@ function IconChangePopUp({ } useEffect(() => { (async () => { - await new Promise((resolve) => setTimeout(resolve, 1)); + await new Promise((resolve) => setTimeout(resolve, 10)); changeIconModal.current?.showModal(); })(); }, []);