Page MenuHomePhabricator

VisualEditor: Link inspector in a slug can select content in the previous or following paragraphs
Closed, ResolvedPublic

Description

If the cursor is in a slug and you press the link button, the selection jumps to the nearest content - which crosses out of the local <p> and into the <p> beforehand or afterwards (whoops).

Link inspector should detect that it is in a slug and not attempt to mangle the selection with nearestContentOffset, but just trigger with a 'blank' selection.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=52256

Details

Reference
bz50446

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:52 AM
bzimport set Reference to bz50446.

As a follow-up, if you have <start of document> <block slug> <block slug> <block slug> <block slug> <p> in a document, and have the cursor in the second slug, pressing Ctrl+K will move the selection to the top of the document and put the contents there (whee); in the third or fourth, to the first word of the <p>. Not great.