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

Change window prevents copy to clipboard #3394

Open
lpatiny opened this issue Mar 4, 2025 · 0 comments
Open

Change window prevents copy to clipboard #3394

lpatiny opened this issue Mar 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lpatiny
Copy link
Member

lpatiny commented Mar 4, 2025

When copying large spectra like 2D to the clipboard it may take 1 or 2s

https://dev.nmrium.org/#/SamplesDashboard/dczjpmbs4a5/Viewcytisine2ddatacytisine2dalljson

If during this time you change the focus and go to the word processor to paste the image NMRium will still say it is copied but there is a catch error in the console

Image

And the image is not in the clipboard.

If there is an error please do not show the green feedback that it is copied but report a pink feedback with the error message.

I don't think we need to check if window.clipboard exists because currently I think it is always available and if not you may as well report the error in the pink feedback to the user.

Another similar error can also appear when OffscreenCanvas is not available.

ReferenceError: Can't find variable: OffscreenCanvas
at pz (./node_modules/nmrium/src/component/utility/export.ts:220:37)

Please also report the error to the user and do not Report this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants