Page MenuHomePhabricator

VisualEditor: Sticky selection popup
Closed, ResolvedPublic

Description

Playing around with text selection a bit I was able to find a "sticky" popup.

Environment: Win7, Chrome 16

What I did:

  1. Select some text
  2. Click on the small arrow that appears above the selected text
  3. Select the "create link" icon
  4. Neither input title for the link, nor close the popup
  5. Instead take the caret somewhere else and select some other word
  6. Repeat 4 and 5 a few times

Soon, the following js error was generated:

Uncaught Invalid annotation error. Can not find non-annotation data in character.
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:54
ve.dm.DocumentNode.getIndexOfAnnotation
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:54
ve.ce.Surface.removeInsertionAnnotation
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:103
ve.ce.Surface.annotate
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:102
ve.ui.LinkInspector.onClose
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:133
ve.ui.Inspector.close
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:123
ve.ui.Context.closeInspector
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:129
(anonymous function)
bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.sandbox%2Cve%7Cext.visualEditor.special.sandbox%7Crangy&skin=vector&version=20120417T202352Z&*:122
jQuery.event.dispatch
load.php:49
jQuery.event.add.elemData.handle.eventHandle
load.php:42

Plus, after a reload; I did the following:

  1. Select text
  2. Click on the arrow above it
  3. Not click any icon but instead take the caret elsewhere. This should (as I see it) have ideally closed the popup, but it didn't.
  4. I clicked on bold and italics but that does nothing (since because the caret has moved there is currently no text selected).
  5. Since the popup is still open, clicking on the link icon opens the link window, and closing it finally closes the popup.

If the first 4 steps are reproduced and step 5 is replaced by clicking on the tickmark instead of the close, nothing happens since no text is selected. The click neither inserts a link into the page, nor closes the popup. After this, even clicking on the close doesn't close the popup. The caret can be moved and other text selected, but that just brings up the arrow and popup again. The previous popup still sticks. The popup finally went away on selecting an existing link in the text and clicking on the link icon in the toolbar. This made the link title appear in the popup and the close button finally worked.

After another reload, I tried the following:

  1. Select text
  2. Click on the arrow
  3. Select some other word. Now, selecting some other word automatically moves the popup to be near the new selection, i.e the popup is already open for the new selection if the popup for the original selection isn't closed before making a new selection. Also, after step 2, since the popup is open, nothing below the popup can be selected without closing the popup first.

Version: unspecified
Severity: normal

Details

Reference
bz36200

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:21 AM
bzimport set Reference to bz36200.

Btw, the second, third and fourth tests also produced some js-errors; but I forgot to note them down.

Mass-moving items into VisualEditor product

This was partly fixed a few commits ago.
Though, context icon was not being properly cleared when the editor loses focus.
Steps to reproduce:

Make a selection (Icon appears)

Click anywhere outside of the editor. ( lose selection, icon is stuck )

Fixed in https://gerrit.wikimedia.org/r/16794