[GH-ISSUE #102] Copy failing on Safari #37

Closed
opened 2026-03-01 14:39:39 +03:00 by kerem · 2 comments
Owner

Originally created by @hammerhai on GitHub (Dec 30, 2024).
Original GitHub issue: https://github.com/arikchakma/maily.to/issues/102

On Safari 18.2 (build 20620.1.16.11.8), Maily is not able to copy template HTML. This is due in part to Safari not implementing clipboard permissions, opposite of Chrome. Thus, the writing requires direct user interaction (a copy function passed to onClick), but Maily uses a hook inside an async function to do so.

More info about a fix that should work with all platforms, meaning no unnecessary if-else statement.

Originally created by @hammerhai on GitHub (Dec 30, 2024). Original GitHub issue: https://github.com/arikchakma/maily.to/issues/102 On Safari 18.2 (build 20620.1.16.11.8), Maily is not able to copy template HTML. This is due in part to Safari not implementing clipboard permissions, opposite of Chrome. Thus, the writing requires direct user interaction (a copy function passed to `onClick`), but Maily uses [a hook](https://github.com/arikchakma/maily.to/blob/25c1f255b6817f3f03a1f354c3b534fd3debf337/apps/web/utils/use-copy-to-clipboard.ts) inside [an `async` function](https://github.com/arikchakma/maily.to/blob/25c1f255b6817f3f03a1f354c3b534fd3debf337/apps/web/components/copy-email-html.tsx#L60) to do so. [More info](https://stackoverflow.com/a/77457920) about a fix that should work with all platforms, meaning no unnecessary `if-else` statement.
kerem closed this issue 2026-03-01 14:39:40 +03:00
Author
Owner

@arikchakma commented on GitHub (Dec 31, 2024):

I can reproduce it. I will fix it in the next weekend😊

Thank you and have a great day.

<!-- gh-comment-id:2566522036 --> @arikchakma commented on GitHub (Dec 31, 2024): I can reproduce it. I will fix it in the next weekend😊 Thank you and have a great day.
Author
Owner

@arikchakma commented on GitHub (Jan 4, 2025):

So the above solution didn't work, so I have added an extra interaction. Thank you for reporting😊

I am working on a migration, hopefully, it will make the process much easier.

<!-- gh-comment-id:2570067125 --> @arikchakma commented on GitHub (Jan 4, 2025): So the above solution didn't work, so I have added an extra interaction. Thank you for reporting😊 I am working on a migration, hopefully, it will make the process much easier.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#37
No description provided.