fix: Make cut/copy/paste work consistently and as expected by RoboErikG · Pull Request #9107 · RaspberryPiFoundation/blockly

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I created isCopyable, above, was to ensure that cut and copy used common criteria for deciding if something can be cut/copied, with cut being allowed for anything that can be copied and is additionally deletable—AFAICT there is no circumstance where it should be possible to cut something but not copy it.

So isCuttable should call isCopyable (not just isICopyable), and return false if it does. Or… we could just have the cut preconditionFn just check isCopyable(focused) && focused.isDeletable(), as it previously did.