Skip to content

Commit

Permalink
firefox-fix-test
Browse files Browse the repository at this point in the history
  • Loading branch information
LoV432 committed Nov 4, 2023
1 parent efc1493 commit 61b96ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/components/user-cards/UserCard.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<dialog ref={changeNameModal} className="modal">
<div className="modal-box bg-zinc-900">
<h3 className="pb-5 text-lg font-bold">Enter New Name</h3>
<input
autoFocus
onKeyDown={(e) => {
if (e.key === 'Enter') {
changeName();
Expand Down Expand Up @@ -291,16 +294,16 @@ 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 (
<dialog ref={setChangeIndexModal} className="modal">
<div className="modal-box bg-zinc-900">
<h3 className="pb-5 text-lg font-bold">Enter New Index</h3>
<input
autoFocus
onKeyDown={(e) => {
if (e.key === 'Enter') {
changeIndex();
Expand Down Expand Up @@ -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();
})();
}, []);
Expand Down Expand Up @@ -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();
})();
}, []);
Expand Down

0 comments on commit 61b96ca

Please sign in to comment.