-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(copy-button): use new clipboard functions #1734
Conversation
we still have a fallback to use execCommand for legacy browser support fix: DSS-388
60ab906
to
05c560d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working properly in Blink/Chromium browsers, but getting an error message in the toast for Webkit(Safari) and Gecko(FF).
Chrome 111 - Works
Chrome Beta 113 - Works
Chrome Canary 114 - Works
Edge 112 - Works
Firefox 112 - Error Message
Safari 16.4 - Error Message
Safari Tech Preview 168 - Error Message
@pixelflips Can you provide a bit more details about the Safari browser you tested with, please? I tested with my local version of Safari (16.4.1) and it works as expected. See the loom video for reference. I will download Firefox and see what's going on there. EDIT: I was able to reproduce both failures in Safari and Firefox. It occurs when you use localhost:4000 as the server address. If you notice in my loom video I am using Let me dig in more as to why this fails when using |
This was done due to the vast differences between descriptors allowed between browsers see https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query for a list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 Rechecked all the same browsers as before and all is working as expected now. Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Not related to this work: as a follow-up we may want the examples to differ in their text. Having the same repeated string makes it tricky to tell which button you've used.
we still have a fallback to use execCommand for legacy browser support
JIRA Ticket: DSS-388
Description
It was discovered that the
copy-button
was not working in certain browsers (versions). The code implemented here addresses both current versions and legacy version support which falls back to usingexecCommand('copy')
.Testing in
sage-lib
Testing in
kajabi-products