Skip to content

Commit

Permalink
Don't autofocus on input when editing item, whishlist, or group
Browse files Browse the repository at this point in the history
  • Loading branch information
RobVermeer committed Dec 3, 2023
1 parent 9fce308 commit ca6106b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/EditGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export const EditGroup = ({ group }: Props) => {
<Pencil size="12" className="mr-2" /> {t("EditGroup.button")}
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogContent
className="sm:max-w-[425px]"
onOpenAutoFocus={(event) => event.preventDefault()}
>
<DialogHeader>
<DialogTitle>{t("EditGroup.title")}</DialogTitle>
</DialogHeader>
Expand Down
5 changes: 4 additions & 1 deletion src/components/EditItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export const EditItem = ({ item }: Props) => {
<Pencil size="12" className="mr-2" /> {t("EditItem.button")}
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogContent
className="sm:max-w-[425px]"
onOpenAutoFocus={(event) => event.preventDefault()}
>
<DialogHeader>
<DialogTitle>{t("EditItem.title")}</DialogTitle>
</DialogHeader>
Expand Down
5 changes: 4 additions & 1 deletion src/components/EditWishlist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export const EditWishlist = ({ wishlist, groups }: Props) => {
<Pencil size="12" className="mr-2" /> {t("EditWishlist.button")}
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogContent
className="sm:max-w-[425px]"
onOpenAutoFocus={(event) => event.preventDefault()}
>
<DialogHeader>
<DialogTitle>{t("EditWishlist.title")}</DialogTitle>
</DialogHeader>
Expand Down

0 comments on commit ca6106b

Please sign in to comment.