Skip to content
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

Catch navigator.clipboard is undefined and display nicer error message #387

Open
krschacht opened this issue Jun 4, 2024 · 0 comments
Open
Labels
good first issue Good for newcomers
Milestone

Comments

@krschacht
Copy link
Contributor

krschacht commented Jun 4, 2024

A firefox user complained that the clipboard buttons don’t work (you can click the icon beneath the cha t message but nothing gets copied to the clipboard). I did a quick check and saw an error for navigator.clipboard in the JS console.

We should check if Firefox has a different API for copying things to the clipboard, or if not, we should (a) catch the exception if this fires and show an JS alert dialog to user explaining the browser doesn’t seem to support copying and/or (b) use one of the browser interrogation techniques to pre-discover that navigator.clipboard is supported or not and actively disable that feature. Disabling the feature would mean: hiding it from beneath messages, hiding it from the top of code blocks within messages, and hiding it from the keyboard shortcut menu (which you open by using the ? shortcut)

@krschacht krschacht added this to the 0.7 milestone Jun 4, 2024
@krschacht krschacht modified the milestones: 0.7, 0.8 Jun 11, 2024
@krschacht krschacht added the good first issue Good for newcomers label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant