Page MenuHomePhabricator

VisualEditor: Exception thrown placing cursor at end of document with no content offsets
Closed, ResolvedPublic

Description

  1. Create a document with just a block image [[File:Foo.jpg|thumb]] on one line
  2. Edit the document and try to place the cursor in the second slug (after the image)
  3. An exception is thrown (getNearestContentOffset(selection.end) returns -1 and this is fed into getAnnotationsFromOffset)

Version: unspecified
Severity: normal

Details

Reference
bz59972

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:40 AM
bzimport set Reference to bz59972.

Change 107134 had a related patch set uploaded by Esanders:
Check for valid offset when calculating insertion annotations

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

Change 107134 merged by jenkins-bot:
Check for valid offset when calculating insertion annotations

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