fix: clipboard edit menu>paste not working in tauri #1238
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue at hand is that users are unable to perform paste actions when clicking on "Edit" menu > "Paste" or the editor context menu > "Paste" in Tauri desktop builds. This problem arises because the browser clipboard APIs are not available in Tauri, necessitating the use of Tauri's own clipboard access APIs.
Clipboard API in browser will usually popup a clipboard access popup which the user have to click agree manually. In tauri this popup never comes. So we add tauris clipboard APIs.
Add integration tests for tauri clipboard access
Integration tests for Tauri clipboard access added. It's important to note that these tests will exclusively function in the Tauri environment. Regrettably, browsers do not permit unattended clipboard access due to security considerations. As a result, the copy-paste test is disabled when running in a browser context.