Page MenuHomePhabricator

Cursoring off of focused block nodes with shift behaves unexpectedly
Open, HighPublic8 Estimated Story Points

Description

To reproduce:

  1. create a document with this HTML: <p>Foo</p><figure class="ve-align-right"><img src="https://upload.wikimedia.org/wikipedia/commons/b/b3/Wikipedia-logo-v2-en.svg" width="100" height="50" alt="Example"><figcaption>caption</figcaption></figure><p>Bar</p>
  2. Click the image to focus it.
  3. Hold down the shift key and use the arrow keys to move the caret focus.

Expected result: The selection expands in the direction in which you moved the cursor.

Actual result: Depends on the direction moved. Left/up just moves the caret without expanding the selection. Right/down selects the interior of the focused node.

Event Timeline

Change 280680 had a related patch set uploaded (by DLynch):
[Failing] Test cases for cursoring off focused block nodes with shift

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

Interestingly, shift+right off of the block node actually removes the blockImage+imageCaption from the data model, which I didn't really expect a call to setLinearSelection to be capable of.

Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR3: Language support on the VisualEditor board.

In a brief test, this seems to work fine now…

(Nevermind, the unit tests still fail.)

Change #280680 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Fix cursoring off focused block nodes with shift

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

Change #1025328 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to f428c59fadb27b0cdd79830eb3db79ccd30b2d82

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

Change #1025328 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to f428c59fadb27b0cdd79830eb3db79ccd30b2d82

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