cms icon indicating copy to clipboard operation
cms copied to clipboard

Copying Password Reset Link on Mobile doesn't work

Open jcohlmeyer opened this issue 2 years ago • 7 comments

Bug description

I tried to copy the password reset link for a user from my iPhone and got only an alert box with a cut-off link I could not copy.

How to reproduce

Try to copy a password reset on iPhone.

Logs

No response

Environment

Statamic 3

Installation

Starter Kit using via CLI

Antlers Parser

No response

Additional details

No response

jcohlmeyer avatar Jul 26 '22 00:07 jcohlmeyer

Hey @jcohlmeyer,

Could you please provide more details or a screenshot? I just tried to replicate it and it works fine for me.

Are you maybe using an iPhone with a smaller viewport width (iPhone SE, 8, Mini etc.)

IMG_F4E7BB89D580-1

joshuablum avatar Jul 26 '22 11:07 joshuablum

Here is a screenshot. Additionally, I can not select text in the alert.

I am using an iPhone Xs Max

image

jcohlmeyer avatar Jul 26 '22 11:07 jcohlmeyer

Thanks!

Does it work in mobile Safari for you?

joshuablum avatar Jul 26 '22 12:07 joshuablum

Yes, it works in Safari, but not Brave.

jcohlmeyer avatar Jul 26 '22 12:07 jcohlmeyer

~~We can't really do anything about this, sorry. It's Brave's implementation of how the alert gets shown. Closing this issue but opening one in statamic/ideas. Could be a good idea to either copy it directly to the clipboard via JS or move away from the system alert to a more custom solution / modal.~~

~~https://github.com/statamic/ideas/issues/832 ✅~~

This is actually a bug. PR https://github.com/statamic/cms/pull/5854 introduced this feature but it's not working correctly.

Thanks for pointing this out, @jcohlmeyer!

joshuablum avatar Jul 27 '22 14:07 joshuablum

Thanks, should the issue re opened then, @joshuablum?

jcohlmeyer avatar Jul 27 '22 23:07 jcohlmeyer

Yes, reopened it 👍

It also doesn't work for the "Copy URL" button in the asset browser.

The problem seems to be here. Instead of copying it to the clipboard and showing a toast notification it throws an error and shows the alert.

Will investigate it.

joshuablum avatar Jul 28 '22 10:07 joshuablum