-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
component: commentsissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Milestone
Description
Describe the bug
- Redo won't re-add a comment to a block that was removed by undoing the addition.
- Undo won't re-add a comment to a block that was removed by using the Remove Comment context menu item.
To Reproduce failure
Steps to reproduce the redo fail behaviour:
- Go to blockly playground.
- From the Logic category, add an "if" block to the workspace.
- Right-click on the new block, choose "add comment"
- Press undo (⌘Z on macOS)
- Press redo (⌘⇧Z on macOS)
Steps to reproduce the undo fail behaviour: steps 1-3 as above, then
4. Right-click on the new block, choose "remove comment"
4. Press undo (⌘Z on macOS)
Expected behaviour
- In the first case, the comment indicator (?) should disappear when undo is pressed, and then reappear when redo is pressed.
- In the second case, the comment indicator (?) should disappear when "remove comment" is selected, and then reappear when undo is pressed.
Actual behaviour
The comment indicator disappears and does not reappear.
Desktop (please complete the following information):
- OS: macOS 12.6.1
- Browser: Firefox 107.0.1 (64-bit), Chrome 108.0.5359.98
- Version: develop @ 3be3d4a (i.e., 9.2.0 release candidate)
Stack Traces
No console ouptut.
Additional context
By adding additional items to the undo stack it can be observed that the action is undone/redone (i.e., it takes up one step of a sequence of undo/redo steps), but without observable effect.
Adding text to the comment before deleting it causes it to be correctly restored.
Metadata
Metadata
Assignees
Labels
component: commentsissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Type
Projects
Status
Done