Page MenuHomePhabricator

On a page with recovered autosaved changes, using Ctrl+Z to undo clears the DM selection (and CE selection is desync'd)
Closed, ResolvedPublic

Description

On a page with recovered autosaved changes, using Ctrl+Z to undo clears the DM selection (and CE selection is desynchronized).

The most annoying effect of this is that pressing Ctrl+Z again does nothing (until you click on the surface to focus it). It doesn't happen when editing a page normally, only if autosaved changes have been recovered on it.

Recording below shows it happening. Every time the selection becomes null, it's because I pressed Ctrl+Z to undo.

As far as the undo stack not being preserved issue, I've found that the full history is actually preserved, but for some reason, after a few Ctrl+Zs, the editor stops responding to my Ctrl+Z until I spam it several more times. Then it continues to back up through the history. Weird, but it seems to work. I don't think it's lag or anything, since undo works immediately from the current editing session, over dozens of changes.

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterUpdate VE core submodule to master (2093bd6f0)
VisualEditor/VisualEditor : masterAllow applyTo to guess a selection for undo

Event Timeline

matmarex created this task.Sep 13 2018, 8:42 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 13 2018, 8:42 AM

This would be fixed by T202730, as the undo stack also stores the selection after each transaction. It may be possible to fix it in other ways though, as we can guess a selection from a transaction (e.g. select the modified range).

Change 460328 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Allow applyTo to guess a selection for undo

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

This bug would be even more annoying on mobile, I can imagine...

Esanders moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 460328 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Allow applyTo to guess a selection for undo

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

Change 461161 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (2093bd6f0)

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

Change 461161 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (2093bd6f0)

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

matmarex moved this task from Inbox to Low Priority on the Editing QA board.Nov 14 2018, 4:32 PM
marcella removed a project: Editing QA.
marcella added a project: Skipped QA.
ppelberg closed this task as Resolved.Aug 28 2019, 3:50 AM