Skip to content

Issues with copy/paste behaviour #136

Description

@LappiLappland

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

Several issues with copy/paste

  1. Error when copying blocks from different workspaces
  2. Error when copying blocks from mutator (if we consider first fixed)
  3. Blocks from mutator get pasted onto main workspace, while Blockly's default behaviour is to paste them inside respected mutator workspace (if we consider first and second fixed)
  4. Blocks from mutator workspace get saved in the storage. This allows to paste procedures_mutatorarg onto main workspace breaking project's import and code generation behaviour
  5. Missing "paste into view" logic for paste by context menu compared to paste by hotkey

Reproduction steps

Videos show reproduction steps

Stack trace

issue 1
Cannot read properties of null (reading 'getParent')
TypeError: Cannot read properties of null (reading 'getParent')
    at eval (webpack-internal:///./src/multiselect_shortcut.js:180:35)
    at Array.forEach (<anonymous>)
    at Object.callback (webpack-internal:///./src/multiselect_shortcut.js:178:17)
    at ShortcutRegistry$$module$build$src$core$shortcut_registry.onKeyDown (webpack-internal:///./node_modules/blockly/blockly_compressed.js:1290:193)
    at onKeyDown$$module$build$src$core$inject (webpack-internal:///./node_modules/blockly/blockly_compressed.js:424:269)
    at HTMLDivElement.f (webpack-internal:///./node_modules/blockly/blockly_compressed.js:86:159)

issue 2
Cannot read properties of undefined (reading 'has')
TypeError: Cannot read properties of undefined (reading 'has')
    at hasSelectedParent (webpack-internal:///./src/global.js:108:59)
    at Object.check (webpack-internal:///./src/multiselect_shortcut.js:151:72)
    at Object.preconditionFn (webpack-internal:///./src/multiselect_shortcut.js:138:29)
    at ShortcutRegistry$$module$build$src$core$shortcut_registry.onKeyDown (webpack-internal:///./node_modules/blockly/blockly_compressed.js:1299:71)
    at onKeyDown$$module$build$src$core$inject (webpack-internal:///./node_modules/blockly/blockly_compressed.js:432:269)
    at HTMLDivElement.f (webpack-internal:///./node_modules/blockly/blockly_compressed.js:97:159)

Screenshots

Issue 1

issue.1.mp4

issue 2

issue.2.mp4

issue 3 and 4

issue.3.and.4.mp4

issue 5

issue.5.mp4

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions