-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Paste (context menu) does not work in security based edge cases #672
Comments
I will look in to fixing this if contributors / maintainers are happy. |
Potential PR: #673 |
Yes, @sanchit3008 , adding permissions to the iframe does work. However, this submission is to maintain functionality in cases where the iframe or the user does not allow clipboard access (due to security or other reasons). |
Is your feature request related to a problem? Please describe.
When using the context menu to "Paste", it required read permissions from the computer clipboard. If the library is used within an iFrame or environment that excludes this permission due to security considerations, the action will result in an error in the console and nothing happens in the sheet.
Describe the solution you'd like
Use
localCopyData
as fallback. When copying, in addition to the current logic, store the data insessionStorage
. When pasting and reading from the clipboard, include a fallback to use the data stored insessionStorage
, allowing for a secure way to maintain functionality in the case of limited clipboard permissions.Describe alternatives you've considered
localStorage
could be used in place ofsessionStorage
, but is slightly less secure which goes against the "target audience" of this fix.localCopyData
could be stored incontext
instead, allowing for potential future uses.Additional context
This should not impact the original logic / functionality, but only solve the potential issues in the above edge cases.
The text was updated successfully, but these errors were encountered: