Page MenuHomePhabricator

[Regression wmf.15] Starting editing in VE loads a new page
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Open a page for reading, open your browser console.
  2. Click the editing tab to start editing in VE.

Expected result:
The editor is loaded without reloading the page (just updating the URL).

Actual result:
The page is loaded with &veaction=edit. When you enable "Stop on all errors" in your debugger, you will stop on "ve.isUnmodifiedLeftClick is undefined".

This seems to be caused by rEVED87ea771ae68e: Centralize some checks for unmodified left clicks, the ve.utils.js file isn't loaded yet, so the used function isn't defined, causing an error and falling back to following the href of the link (which loads VE, but does so by loading a new page).

Event Timeline

Where are you seeing this? Not seeing it on en.wiki/betalabs/mw.org or local master.

I do see it. It's a dependency issue -- ext.visualEditor.desktopArticleTarget.init doesn't depend on ext.visualEditor.base, where ve.utils.js lives. I assume we don't want to just promote that file into an always-loaded dependency like ext.visualEditor.ve?

Quick fixes:

  • Move ve.utils.js into ext.visualEditor.ve
  • Move just that function into lib/ve/src/ve.js
  • Just copy that function into ve.init.mw.DesktopArticleTarget.init (course of least-change)

Change 306044 had a related patch set uploaded (by DLynch):
init: port in isUnModifiedLeftClick without any VE core dependencies

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

Jdforrester-WMF renamed this task from [Regression] Starting editing in VE loads a new page to [Regression wmf.15] Starting editing in VE loads a new page.Aug 22 2016, 9:23 PM
Jdforrester-WMF assigned this task to DLynch.
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.

Change 306044 merged by jenkins-bot:
init: port in isUnModifiedLeftClick without any VE core dependencies

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