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

fix TypeError: Cannot read properties of undefined (reading 'writeText') #303

Merged
merged 1 commit into from
Apr 22, 2023
Merged

Conversation

codecsrayo
Copy link
Contributor

This pull request implements a fix for a TypeError that occurs when trying to use the navigator.clipboard.writeText method in Microsoft Edge, which may not have support for the Clipboard API in some versions. To resolve this issue, we have added a check for the existence of the navigator.clipboard object before attempting to use the writeText method. In cases where the Clipboard API is not supported, we have provided a fallback method for copying text to the clipboard using a temporary textarea element.

This fix ensures compatibility with Microsoft Edge and other browsers that may have limited or no support for the Clipboard API, preventing the TypeError from occurring and enabling the text copy functionality to work as expected.

@vercel
Copy link

vercel bot commented Apr 21, 2023

@codecsrayo is attempting to deploy a commit to the reworkd Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Apr 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2023 4:03am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants