Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

dont autofocus input on mobile

Steven Tey30d92e7151c7
diff --git a/apps/docs/integrations/make.mdx b/apps/docs/integrations/make.mdx
index f58de768aa..da3949d85d 100644
--- a/apps/docs/integrations/make.mdx
+++ b/apps/docs/integrations/make.mdx
@@ -1,6 +1,6 @@
---
title: "Make.com (Planned)"
-description: "Make.com x Dub Integration"
+description: "Make.com <> Dub Integration"
---
We are planning to add a Make.com integration for Dub soon. Feel free to thumbs-up this page to help us prioritize this feature.
diff --git a/apps/docs/integrations/pipedream.mdx b/apps/docs/integrations/pipedream.mdx
index 73859a3263..df0b477c44 100644
--- a/apps/docs/integrations/pipedream.mdx
+++ b/apps/docs/integrations/pipedream.mdx
@@ -1,6 +1,6 @@
---
title: "Pipedream (Planned)"
-description: "Pipedream x Dub Integration"
+description: "Pipedream <> Dub Integration"
---
We are planning to add a Pipedream integration for Dub soon. Feel free to thumbs-up this page to help us prioritize this feature.
diff --git a/apps/docs/integrations/raycast.mdx b/apps/docs/integrations/raycast.mdx
index 8a8903483e..a2c9495282 100644
--- a/apps/docs/integrations/raycast.mdx
+++ b/apps/docs/integrations/raycast.mdx
@@ -1,6 +1,6 @@
---
title: "Raycast (Planned)"
-description: "Raycast x Dub Integration"
+description: "Raycast <> Dub Integration"
---
We are planning to add a Raycast integration for Dub soon. Feel free to thumbs-up this page to help us prioritize this feature.
diff --git a/apps/docs/integrations/zapier.mdx b/apps/docs/integrations/zapier.mdx
index b76190ba31..758e07f81a 100644
--- a/apps/docs/integrations/zapier.mdx
+++ b/apps/docs/integrations/zapier.mdx
@@ -1,6 +1,6 @@
---
title: "Zapier (Planned)"
-description: "Zapier x Dub Integration"
+description: "Zapier <> Dub Integration"
---
We are planning to add a Zapier integration for Dub soon. Feel free to thumbs-up this page to help us prioritize this feature.
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index d401bcf20a..4abb049436 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -10,6 +10,7 @@ import {
Logo,
Modal,
TooltipContent,
+ useMediaQuery,
useRouterStuff,
} from "@dub/ui";
import {
@@ -299,6 +300,8 @@ function AddEditLinkModal({
}
}, [key]);
+ const { isMobile } = useMediaQuery();
+
return (
<Modal
showModal={showAddEditLinkModal}
@@ -420,7 +423,7 @@ function AddEditLinkModal({
"https://dub.co/help/article/what-is-dub"
}
value={url}
- autoFocus={!key}
+ autoFocus={!key && !isMobile}
autoComplete="off"
onChange={(e) => {
setUrlError(null);
diff --git a/apps/web/ui/modals/add-project-modal.tsx b/apps/web/ui/modals/add-project-modal.tsx
index a6cd22ccec..5cfc4a6884 100644
--- a/apps/web/ui/modals/add-project-modal.tsx
+++ b/apps/web/ui/modals/add-project-modal.tsx
@@ -5,6 +5,7 @@ import {
Logo,
Modal,
Switch,
+ useMediaQuery,
useRouterStuff,
} from "@dub/ui";
import {
@@ -90,6 +91,8 @@ function AddProjectModalHelper({
}
}, [searchParams]);
+ const { isMobile } = useMediaQuery();
+
return (
<Modal
showModal={showAddProjectModal}
@@ -172,7 +175,7 @@ function AddProjectModalHelper({
id="name"
type="text"
required
- autoFocus
+ autoFocus={!isMobile}
autoComplete="off"
className="block w-full rounded-md border-gray-300 text-gray-900 placeholder-gray-300 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm"
placeholder="Acme, Inc."