Skip to content

Commit

Permalink
Make copy/cut keyboard shortcuts work in the Discord Activity
Browse files Browse the repository at this point in the history
- This allows copying to the clipboard to work in the Discord Activity,
but only within JS Paint and between instances of JS Paint, using a text
based clipboard format, and only via Ctrl+C/Ctrl+X (or Cmd+C/Cmd+X).
- Ctrl+V (or Cmd+V) already worked.
- Edit > Cut/Copy/Paste menu items remain nonfunctional.
  • Loading branch information
1j01 committed May 1, 2024
1 parent c1357a8 commit f13b972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ $G.on("cut copy paste", e => {
});
}
};
if (!navigator.clipboard || !navigator.clipboard.write) {
if (!navigator.clipboard || !navigator.clipboard.write || is_discord_embed) {
return do_sync_clipboard_copy_or_cut();
}
try {
Expand Down

0 comments on commit f13b972

Please sign in to comment.