Trumbowyg icon indicating copy to clipboard operation
Trumbowyg copied to clipboard

History Plugin does not restore Image twice

Open realulim opened this issue 6 years ago • 1 comments

Informations

Firefox 64.0.2 Mac OS X

How to reproduce the bug?

  1. Go to https://alex-d.github.io/Trumbowyg/demos/#plugins-history
  2. Clear text in editor (important)
  3. Paste small image into editor
  4. Place cursor behind image and delete via Backspace
  5. Undo via History button - works
  6. Place cursor behind image again and delete via Backspace
  7. Undo via History button - does not work (image is not restored)
  8. Weird: click Undo button again - the text will reappear

realulim avatar Jan 14 '19 00:01 realulim

In fact, this bug has nothing to do with images. The same problem occurs if, for example, a character is typed instead of an image pasted. The second undo does not work, because the internal stack gets messed up and an empty string is restored from it (instead of the actual content that was deleted).

realulim avatar Jan 29 '19 21:01 realulim