Page MenuHomePhabricator

VisualEditor: Clicking the hyper link button twice breaks the button.
Closed, DuplicatePublic

Description

(Tested in Firefox 22 and Chrome 28)

Steps to reproduce:

  • Open [[Portland Ice Arena (Oregon)]] with the visual editor.
  • Click the hyperlink button (Don't select anything). The hyperlink window should pop up.
  • Now click anywhere else in the article without entering any data in the hyperlink popup.
  • An empty popup balloon will remain behind. There are no controls on that popup anymore.
  • Click around the article a bit - eventually that balloon will be removed. However, the link button will now fail to work no matter what you do.

This may or may not be related to bug 48549, which seems to have been fixed in todays deployment.


Version: unspecified
Severity: normal

Details

Reference
bz51984

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:10 AM
bzimport set Reference to bz51984.

I can't reproduce this. Do you see any errors in your JS console?

Yep, one pops up on step 3:

[23:46:29.770] Error: No class registered by that name: undefined @ https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&lang=en&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=monobook&version=20130724T164530Z&*:2

The above screenshot displays what occurs on the page. Also, a more specific set of steps that might help to reproduce this:

  1. Edit the [[Portland Ice Arena (Oregon)]] page in the visual editor.
  2. Place the cursor directly after reference [2].
  3. Click the hyperlink button. It should create the regular hyperlink balloon as seen in the left side of the attached screenshot.
  4. Click the 'Not to be confused with Portland Ice Arena (Maine).' template. This will cause the template to "blank" itself as seen in the right side of the screenshot.
  5. Click the 'Not to be confused with Portland Ice Arena (Maine).' template another time. This will cause the empty edit balloon to disappear.
  6. Try the edit link button anywhere in the page itself - it will no longer work (Not on existing links nor on new ones)

Note that it is not required to click the template - clicking elsewhere will work as well.

Chrome 28 - Error console

And last: A screenshot of chrome's console. It seems to be a tad more in depth than the error Firefox displays.

Attached:

Chrome_Console.png (312×1 px, 63 KB)

I was able to reproduce following the steps in comment 3.

Addendum:
After some more testing it would seem that the link button will always break whenever the user selects an element that normally wouldn't be hyperlinked. If one does select a non linkable element and presses the hyperlink button the empty balloon popup will always occur.

These elements include - among others - images, templates, references and objects that cannot be edited in the visual editor yet. Unfortunately there seems to be no way restore the link buttons functionality without reloading the editor itself.

most likely duplicate of bug 51404, which should be subsequently renamed from "crashing when inserting link without selection" to "crashing when inserting link on non-linkable or empty selection"

  • This bug has been marked as a duplicate of bug 51404 ***