Page MenuHomePhabricator

In Firefox: using the keyboard shortcut to open the preview breaks
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Open page in NWE
  2. Make a change
  3. Hit shortcut for preview dialog (ctrl-p)
  4. Observe error in console and page in broken state (greyed out with dialog overlay, no dialog)

Specifically, it's breaking here in selectRange, as a result of trying to call moveCursorToEnd on the save dialog's editSummaryInput:

	try {
		input.setSelectionRange( start, end, isBackwards ? 'backward' : 'forward' );
	} catch ( e ) {
		// IE throws an exception if you call setSelectionRange on a unattached DOM node.
		// Rather than expensively check if the input is attached every time, just check
		// if it was the cause of an error being thrown. If not, rethrow the error.
		if ( this.getElementDocument().body.contains( input ) ) {
			throw e;
		}
	}
11:56:55.543 NS_ERROR_FAILURE:  1 oojs-ui-core.js:9141
	OO.ui.TextInputWidget.prototype.selectRange http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-core.js:9141:3
	OO.ui.TextInputWidget.prototype.moveCursorToEnd http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-core.js:9206:9
	ve.ui.MWSaveDialog.prototype.getReadyProcess/< http://dev.wiki.local.wmftest.net:8080/w/extensions/VisualEditor/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js:584:4
	proceed/< http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:845:14
	OO.ui.Process.prototype.execute http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:880:13
	OO.ui.Window.prototype.ready http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:2255:9
	OO.ui.WindowManager.prototype.openWindow/</</</< http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:1338:7
	EventLoop.prototype.enter resource://devtools/server/actors/script.js:348:5
	bound  self-hosted
	ThreadActor<._pushThreadPause resource://devtools/server/actors/script.js:531:5
	ThreadActor<.onExceptionUnwind resource://devtools/server/actors/script.js:1870:7
	bound  self-hosted
	OO.ui.TextInputWidget.prototype.selectRange http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-core.js:9147:4
	OO.ui.TextInputWidget.prototype.moveCursorToEnd http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-core.js:9206:9
	ve.ui.MWSaveDialog.prototype.getReadyProcess/< http://dev.wiki.local.wmftest.net:8080/w/extensions/VisualEditor/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js:584:4
	proceed/< http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:845:14
	OO.ui.Process.prototype.execute http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:880:13
	OO.ui.Window.prototype.ready http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:2255:9
	OO.ui.WindowManager.prototype.openWindow/</</</< http://dev.wiki.local.wmftest.net:8080/w/resources/lib/oojs-ui/oojs-ui-windows.js:1338:7

Event Timeline

Change 334373 had a related patch set uploaded (by DLynch):
MWSaveDialog: only focus summary if we're on the save panel

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

Change 334373 merged by jenkins-bot:
MWSaveDialog: only focus summary if we're on the save panel

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

Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.