Page MenuHomePhabricator

VisualEditor: Link inspector ignores selected value
Closed, ResolvedPublic

Description

  1. Edit some text (e.g the -> foo)
  2. Edit existing link (e.g. on [[mw:VisualEditor]], link to "Parsoid")
  3. Enter text that makes up part of a title (e.g. "ResourceLoade", note, the missing "r" at the end)
  4. Select "ResourceLoader" from the suggestions (due to a bug in our search engine, this is the second suggestion, not the first: [ > ResourceLoade ]
    • ResourceLoader/JavaScript Deprecations
    • ResourceLoader
    • ResourceLoader/Version 1 Design Specification
  1. Observe that the suggestions close after selecting an item, and the text field now contains "ResourceLoader". Do not press enter or click anywhere.
  1. Press Save Page

Video: http://cl.ly/11431q402d3A

Expected:

  • Diff shows "the -> foo", and "Parsoid -> ResourceLoader".

Actual:

  • Diff shows "the -> foo".

Because:

We both selected a value from the suggestions and then blurred the inspector by clicking "Save page". Either of those actions ought to save the value into the model, but doing both certainly should.

There are two weird things about this:

  • Changing step 4 and pressing Enter there instead of Save page, makes it save correctly.

So it seems that we just don't save properly on selection or blurring and require one of Escape-key, Enter-key, Back-button or focussing surface (instead of blurring inspector / focussing anything in the main window, e.g. toolbar / save button as well, not just surface).

  • Changing step 2/3 to type "ResourceLoader" straight up, and not pressing Enter or clicking anywhere before clicking Save page also works.

So it seems that merely changing focus from input field to save page can be enough to have it saved. Maybe we have an exception for onkeyup/onchange and select is bypassing that?


Version: unspecified
Severity: major

Details

Reference
bz65343

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:12 AM
bzimport set Reference to bz65343.

Change 138114 had a related patch set uploaded by Catrope:
[BREAKING CHANGE] Update VE core submodule to master (43a48cb) for window process cleanup

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

Change 138114 merged by jenkins-bot:
[BREAKING CHANGE] Update VE core submodule to master (43a48cb) for window process cleanup

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

Following the steps exactly as per comment #0 still exhibits this bug exactly.

I can reproduce it locally on latest master by making a link to User:Root when typing "User:Ro" where the suggestions are [ "User:Root/common.js", "User:Root" ].

  • Bug 68934 has been marked as a duplicate of this bug. ***

Change 155673 had a related patch set uploaded by Catrope:
Select the correct annotation in MWLinkTargetInputWidget

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

Change 155673 merged by jenkins-bot:
Select the correct annotation in MWLinkTargetInputWidget

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

  • Bug 68934 has been marked as a duplicate of this bug. ***