Page MenuHomePhabricator

VisualEditor: Link inspector icon appears after deleting the content of the page and closing the inspector causes an error in the console: Uncaught Error: Offset could not be translated to a DOM element and offset: 65
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open this page: https://en.wikipedia.org/wiki/User:RYasmeen_%28WMF%29/sandbox?veaction=edit

2.Select all the content

3.Delete it.

4.A link inspector icon appears in the page.

5.Open the link inspector

6.Close it

Observed Result:
The links inspector gets all blank and an error appears in the console:
Uncaught Error: Offset could not be translated to a DOM element and offset: 65


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-03-27_at_3.38.34_PM.png (779×1 px, 158 KB)

Details

Reference
bz63208

Event Timeline

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

Deleting everything results in an empty document but for the internalList, i.e. [{'type':'internalList'...}, ...]. The popup tool is then look for annotations at range 0 which is then going inside the internal list and finding the link.

Change 122556 had a related patch set uploaded by Esanders:
Fix handlesOwnChildren check in getRelativeOffset

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

Change 122556 merged by jenkins-bot:
Fix handlesOwnChildren check in getRelativeOffset

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