Page MenuHomePhabricator

Undo/redo after paste only works once in Firefox
Closed, InvalidPublic

Description

With Firefox 79.0 on Windows 7 64 bits, with the wiki editor, we can only undo/redo once pasting content that replaces all the current content.
This is especially annoying because it means there's no reliable workaround to T124435.

Steps to reproduce:

  1. Open https://en.wikipedia.org/w/index.php?title=Air&action=edit in Firefox
  2. Copy the last two lines
  3. Press CTRL + A to select all the text
  4. Press CTRL + V to paste the copied text
  5. Press CTRL + Z to undo paste (it works)
  6. Press CTRL + Y to redo paste (it works)
  7. Press CTRL + Z to undo paste (it doesn't work)

Event Timeline

This issue does not seem related to the wiki editor but to how Firefox handles undo stack. You can reproduce the same issue here: https://jsfiddle.net/4n7s8p19/

As you pointed out, the issue occurs with full text replacement but not partial replacement.

Closing as this does not seem to be an issue in Wikimedia code. Not sure if there is an upstream issue, from a quick look see stuff like https://bugzilla.mozilla.org/show_bug.cgi?id=1521821 or https://bugzilla.mozilla.org/show_bug.cgi?id=1247483 or https://bugzilla.mozilla.org/show_bug.cgi?id=1447924 ...