Skip to content

Fix: fallback text needed to avoid breaking the browser#518

Merged
MichaelMatejko merged 3 commits into
silevis:developfrom
Reston:fix/copy-fallback-text-needed
Apr 16, 2025
Merged

Fix: fallback text needed to avoid breaking the browser#518
MichaelMatejko merged 3 commits into
silevis:developfrom
Reston:fix/copy-fallback-text-needed

Conversation

@Reston

@Reston Reston commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

This pull request includes changes to the src/lib/Functions/handleCopy.ts file to improve the clipboard copy functionality and handle errors more gracefully. The most important changes include reordering imports for consistency and enhancing the copyDataCommands function to support plain text and handle errors.

Improvements to clipboard copy functionality:

There's more info about why using only html is broken here: https://github.com/nikouu/Web-API-Clipboard.write-Examples?ref=nikouusitalo.com

I tested this in ubuntu using chrome, firefox and brave with cells grid of number, text and custom select.

This should fix #509

@robofish robofish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

indentation of the file appears to be inconsistent however.

@arshrangi

Copy link
Copy Markdown

Hi! 👋 Just checking in to see if there's an estimated timeline for merging this PR. We've tested the fix and it's working well on our end — would love to rely on the official package once it's merged. Thanks!

@robofish

Copy link
Copy Markdown
Contributor

apparently the old behavior (e.g. using reactgrid@4.1.12) allows copying again in Chrome v135. So maybe the chrome engineers have reversed some changes. haven't seen anything about it on the high-level changelog though.

@arshrangi

Copy link
Copy Markdown

We are currently using version 4.1.15 and the copy behaviour is not working as expected. Upon updating to version 4.1.16 the ReactGrid component start crashing, when try to copy contents using CMD + C. We tested this fix and it solves the issues.

@MichaelMatejko MichaelMatejko merged commit 99a06bb into silevis:develop Apr 16, 2025
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.

Copy / Paste broken on Chrome v134

4 participants