Skip to content

events not grouped correctly for cut/paste #9164

@maribethb

Description

@maribethb

Check for duplicates

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

Description

When a block or workspace comment (or other ICopyable thing) is cut or pasted, several events are fired at once:

for cut

  • Selected (old: block id, new: null)
  • Delete block or delete comment

for paste, or duplicate context menu option

  • selected (old: whatever was previously selected, new: id of pasted thing)
  • Create block or create comment

These two events should be grouped since they are part of the same user action. They are only grouped for the case of cutting a block specifically, because the cut callback calls a block's checkAndDelete method which handles event grouping. For the case of cutting other non-block types, or pasting anything including blocks, or using the duplicate context menu item, there is no group id set on the events fired in those cases.

Reproduction steps

  1. Enable event logging in the playground
  2. Cut a block with ctrl+x and notice the events fired have a group id
  3. Cut a workspace comment with ctrl-x and notice they don't

Stack trace

Screenshots

No response

Browsers

No response

Metadata

Metadata

Assignees

Labels

component: eventsissue: bugDescribes why the code or behaviour is wrongsize: smallBugs that can be picked up and completed in 1-3 days

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions