question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Moving blocks (or Drag and Drop) + Undo seems squishy

See original GitHub issue

Precheck

  • Do a quick search and make sure the bug has not been reported yet.
  • Please disclose security vulnerabilities privately at oss@kommit.co.
  • Finally, be nice and have fun!.

Description

It seems that moving blocks (via Drag-and-Drop OR via BlockTune) doesn’t behave consistently.

Environment

  • Editor.js version: 2.24.2
  • Plugins you use with their versions:
    • "@editorjs/header": "^2.6.2"
    • "@editorjs/paragraph": "^2.8.0"
  • Device, Browser, OS:
    • Mac
    • Safari Version 15.4 (17613.1.17.1.6)
    • OSX Moneterey 12.3

Current behavior

  1. Move via Drag and Drop to last position.
  2. Press Undo-Combination
  3. First Paragraph is missing. Last two Paragraphs are duplicate

Expected behavior

  1. Move via Drag and Drop to last position
  2. Press Undo-Combination
  3. First and Last Paragraph should be switched correctly

Additional context

Attached 2 Videos with two different behaviors

Bug with Drag and Drop

https://user-images.githubusercontent.com/1446269/167936531-2daca295-ff9f-46a0-83fb-151860eeac47.mov

Bug with BlockTune

https://user-images.githubusercontent.com/1446269/167936589-d322b867-fcb6-46ca-9ad8-c50020434edd.mov

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
christoph-klugecommented, Jun 8, 2022

I’ve updated my local version and reverted the workaround. It seems that it’s all good now. Closing here.

Thank you so much for the quick repsonse 🙏

1reaction
MarthoxGTcommented, Jun 8, 2022

Hey @christoph-kluge, hope you’re doing great!

There’s up a new release (v2.0.3) where I tested the case you sent to us in the sandbox, and for me it seems to be working smoothly, please let us know if it fix the problem

Thanks for your time! Best regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature request: add a undo button · Issue #19 - GitHub
It only takes one slight spot on your stylus or screen. Repeated drag and drops that could be 5"+ in physical distance will...
Read more >
Apply Undo Redo on elements that can dragable (drag and ...
Mine, as I have a drag and drop editor with different modes of edits. Drag and Drop Elements. Edit Elements HTML/Pictures. Sorting elements....
Read more >
Make moving (reordering) blocks inside a script less frustrating
How to solve this (updated based on feedback below): Blockly, and MS Arcade allows dragging a single block by holding Ctrl. If you...
Read more >
Can't drag and drop blocks in 5.5 - WordPress.org
The drag and drop is available by clicking, and holding down, on the up or down buttons for a second, you can then...
Read more >
Resolved - How can I undo with drag and drop in the treeview?
Code was written to implement undo in drag and drop while implementing treeview. This code is TreeView Sample example code. Code (CSharp):.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found