VisualEditor: Undo keyboard shortcuts clear undo / redo history if pressed too often (And other fun)
Closed, ResolvedPublic

Description

Tested on Firefox 22 (Monobook) and Chrome 28 (Vector)

Steps to reproduce:

  • Open any random page in the visual editor. Personally i used [[Botnet]].
  • Add the word "Test" to the page.
  • Press Ctrl + Z to undo the edit. Keep pressing till the edit is gone, then press it once more.

Once you have done this, the Redo button and the Redo shortcut (Ctrl+Shift+Z) no longer seem to restore the previous edits. Any subsequent edit seems to reset the undo / redo buttons to an "There were no previous edits" state.

Inconsistent results:

Besides the above result that i can always reproduce using these steps, i have seen various other results. I have seen each of these at least twice but no matter what i try, i cannot seem to find any method of reproducing these reliably.

  • An entry in the console log stating "Error: Cannot roll back a transaction that has not been committed "
  • An entry in the console log stating "Error: Range error: Range is no longer valid after DOM mutation ([WrappedRange("Zz":1, "Zz":1)]) "
  • The redo button suddenly inserting "♙" once in Chrome.
  • The undo button suddenly inserting an endless steam "♙" in Firefox.

Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51532
https://bugzilla.wikimedia.org/show_bug.cgi?id=52185

bzimport set Reference to bz52113.
Excirial created this task.Via LegacyJul 26 2013, 8:17 PM
jayvdb added a comment.Via ConduitJul 27 2013, 6:11 AM

I've reproduced a few of these permutations.

Platonides added a comment.Via ConduitAug 14 2013, 1:40 PM

It's obviusly inviting you to play chess :)

gerritbot added a comment.Via ConduitAug 14 2013, 1:48 PM

Change 79049 had a related patch set uploaded by Esanders:
Check for past/future state in undo/redo before setting breakpoint

https://gerrit.wikimedia.org/r/79049

gerritbot added a comment.Via ConduitAug 16 2013, 2:44 AM

Change 79049 merged by jenkins-bot:
Check for past/future state in undo/redo before setting breakpoint

https://gerrit.wikimedia.org/r/79049

Jdforrester-WMF added a comment.Via ConduitAug 16 2013, 2:50 AM

Now merged into master; will be deployed in the next push.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.