Skip to content

Conversation

@maribethb
Copy link
Collaborator

@maribethb maribethb commented Jul 8, 2025

Fixes #615

  • Removes the copyWorkspace property from the clipboard actions. This is now (once again) tracked in core for the default copy/paste implementation, and having it here was incorrect for the cross-tab-copy-paste implementation.
  • By default, the "paste" option in the context menu will be greyed out if you try to paste in a workspace that does not match the one that was copied from. This is because if you use the default implementation of copy/paste from core, you will always paste into the workspace that was copied from, and it would be confusing if you selected the "paste" option in workspace B but a block appeared in workspace A.
  • If a developer has enabled an alternate implementation of copy/paste, such as that provided by @blockly/plugin-cross-tab-copy-paste, then they can pass an option upon initializing the plugin that makes the option not appear greyed out in these cases.
  • Updates the readme with this information

Tested with vanilla blockly and with the cross-tab-copy-paste plugin.

Note to reviewer: I rearranged the code in clipboard.ts because it was in an order that was driving me nuts. If you view this PR commit-wise it will be easier to review.

@maribethb maribethb requested a review from a team as a code owner July 8, 2025 22:30
@maribethb maribethb requested review from RoboErikG and removed request for a team July 8, 2025 22:30
@maribethb maribethb merged commit e5a784b into RaspberryPiFoundation:main Jul 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix paste workspace

2 participants