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

Poor error handling when navigator.clipboard-based paste or paste special fails #8292

Closed
vmiklos opened this issue Feb 16, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working unconfirmed

Comments

@vmiklos
Copy link
Contributor

vmiklos commented Feb 16, 2024

Describe the Bug

When we try to use the new navigator.clipboard-based paste / paste special in Chrome and the permission is not granted, then the error handling behavior is worse in Firefox where we don't try to use navigator.clipboard.

Steps to Reproduce

  1. Create a Calc document, put 1 and 2 to cells, a SUM() formula to a 3rd cell.
  2. Copy the formula using Ctrl-C.
  3. Click paste special in the notebookbar and reject the permission popup.

Expected Behavior

A popup is shown that you need to use Ctrl-V and the popup disappears when Ctrl-V is pressed, as in Firefox.

Actual Behavior

Nothing happens, just an error message in the devtools console.

Screenshots

Console output:

navigator.clipboard.read() failed: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details.

Additional Context

This problem is specific to Chrome, it won't happen in Firefox.

@vmiklos vmiklos added bug Something isn't working unconfirmed labels Feb 16, 2024
@vmiklos vmiklos self-assigned this Feb 16, 2024
@vmiklos
Copy link
Contributor Author

vmiklos commented Feb 16, 2024

nextcloud/richdocuments#3474 for the nextcloud/richdocuments side of this.

@vmiklos
Copy link
Contributor Author

vmiklos commented Feb 19, 2024

#8306 fixed the COOL side.

@vmiklos vmiklos closed this as completed Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
Archived in project
Development

No branches or pull requests

1 participant