Page MenuHomePhabricator

LOST WORK BUG: If you use the shortcut keyboard command to preview, you lose all your changes.
Closed, ResolvedPublic1 Estimated Story Points

Description

Report from @Sadads:

When I press the Ctrl+ P shortcut, to preview, my contributions disappear and the page, loads temporarily without a "back button" with what I am assuming is a preview of my changes, but when I go back to work on the page, the editor interface has lost my changes.

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 22 2016, 5:49 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I haven't been able to reproduce this because I can't get the keyboard shortcut (ctrl-option-p) to do anything in Safari 10.

I can reproduce the original report in Wikipedia. As far as I can see, the preview shortcut just isn't live yet on Wikipedia, so the shortcut still calls the print version. This should fix itself with the next deployment.

Well, or not: I can also reproduce a similar serious bug on https://de.wikipedia.beta.wmflabs.org/wiki/Hilfe:VisualEditor/Anleitung?veaction=editsource:

When I press Alt-Shift-P while editing in Firefox, the page is grayed out, leaving me without any way to edit, save or do anything else. Relevant entry from browser console seems to be

NS_ERROR_FAILURE:
OO.ui.TextInputWidget.prototype.selectRange()
load.php:1860
OO.ui.TextInputWidget.prototype.moveCursorToEnd()
load.php:1861
ve.ui.MWSaveDialog.prototype.getReadyProcess/<()
load.php:318
proceed/<()
load.php:1978
OO.ui.Process.prototype.execute()
load.php:1978
OO.ui.Window.prototype.ready()

Ahaha, it looks like we need to figure out what the shortcut will be and how it will respond to editors. Thank you for exploring this.

DLynch added a subscriber: DLynch.Dec 22 2016, 5:47 PM

Preview shortcut varies depending on platform/browser -- should be the same as the classic editor's preview shortcut, though. e.g. on Mac it's ctrl-option-p. Command help dialog should be accurate in all cases, though.

@Sadads: Can you elaborate on what you did to "go back to work"? Did you click the "resume editing" button in the top-left of the screen / use the browser back button?

And did it look like

or like

?

@Schnark: I've made T153958 for the seemingly firefox-specific bug opening the preview dialog via the shortcut.

Tgr added a subscriber: Tgr.Dec 23 2016, 11:17 AM

In Chrome Alt-Shift-P does show me the standard beforeunload warning popup, but if I okay that, I end up in the print view of the article (which is where Alt-Shift-P takes you on article pages, but I wouldn't expect it in an editor).

TheDJ added a subscriber: TheDJ.Feb 1 2017, 10:10 AM

Is this still a problem ?

DLynch added a comment.Feb 1 2017, 4:54 PM

It's plausible, looking back at this, that the problem was fixed by 4d134cfefcf5f5477f50679a6edef1be54277b0e which removed accesskey conflicts. That was Dec 16th, so the timeline would depend a bit on where exactly people were testing things.

Dvorapa added a subscriber: Dvorapa.Feb 1 2017, 5:03 PM

@DLynch when was it deployed to WMF wikis?

DLynch added a comment.Feb 1 2017, 5:06 PM

The ticket got tagged with WMF-deploy-2016-12-06_(1.29.0-wmf.5) for the initial "we have accesskeys now" patch, and WMF-deploy-2017-01-03_(1.29.0-wmf.7) for the commit I suggested as a fix, so I guess the timeline for this ticket being filed is about right.

Tgr added a comment.EditedFeb 1 2017, 6:53 PM

Is this still a problem ?

No, the shortcut now opens the same preview dialog that would come up by clicking Save changes -Show preview, without any loss of data. Thanks!

Jdforrester-WMF closed this task as Resolved.Feb 1 2017, 7:51 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Very well…