Page MenuHomePhabricator

VisualEditor occasionally opens a link within a template instead of the template's settings when clicked
Closed, ResolvedPublic1 Estimated Story Points

Description

Originally reported in June 2017 here.

Description: VisualEditor occasionally opens a link within a template instead of the template's settings when clicked.
There is a split second, when hovering over a template, before VisualEditor identifies the template as being in editor mode rather than reading mode; the link I'm hovering over flashes with an underline. Occasionally, this state of the template persists beyond a split second, and when this happens it only goes away when I stop hovering over the template.

Intention: Click on a template to select it.

Steps to reproduce: It is difficult to reproduce as this bug occurs at a somewhat occasional frequency, but:

  1. Enter VisualEditor.
  2. Hover the mouse over any link in any template in a page
  3. Click the link.

Result: 90% of the time, the template will be selected, as normal. ~10% of the time, the link inside the template will instead be clicked and you will be either taken to the page (if you've made no edits to the article yet) or, in Chrome, shown a dialogue message saying "Do you want to leave this site? Changes that you made may not be saved.", giving you an option to "Leave" or "Stay".

Expectation: Any template, when clicked in editor mode, should not open any links within it.

Web browser: Chrome 67

Operating system: Windows 7 64-bit

Screenshot:

image.png (329×1 px, 50 KB)
(screenshot of the bug in action; I clicked the Other uses template in editor mode, but VisualEditor is trying to navigate me to a link within the template instead of opening the template's settings.)

Video: I put together an annotated video showing the glitch in action.

Event Timeline

Change 441067 had a related patch set uploaded (by DLynch; owner: DLynch):
[VisualEditor/VisualEditor@master] ce.FocusableNode: suppress left clicks within the focusable element

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

I found the simplest way to test reproducing this was to make a template which just contains a single link, include it on an editor page, and then use dev tools to outright remove the highlight node. Leaves the link easily accessible for clicking.

Change 441067 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ce.FocusableNode: suppress left clicks within the focusable element

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

Change 441184 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (e72749663)

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

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

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

Deskana triaged this task as Medium priority.
Vvjjkkii renamed this task from VisualEditor occasionally opens a link within a template instead of the template's settings when clicked to soaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed DLynch as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii edited subscribers, added: DLynch; removed: gerritbot, Aklapper.
Mainframe98 renamed this task from soaaaaaaaa to VisualEditor occasionally opens a link within a template instead of the template's settings when clicked.Jul 1 2018, 7:32 AM
Mainframe98 closed this task as Resolved.
Mainframe98 assigned this task to DLynch.
Mainframe98 lowered the priority of this task from High to Medium.
Mainframe98 updated the task description. (Show Details)
Mainframe98 set the point value for this task to 1.
Mainframe98 edited subscribers, added: Aklapper, gerritbot; removed: DLynch.