Page MenuHomePhabricator

VisualEditor: Undoing creation of empty heading places cursor at invalid offset
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE
2.Create a heading
3.Undo creating the heading and type something in that line instead
4.Press enter

Observed Result:
Uncaught Error: Inserted data is trying to close the root node (at index 0) is appearing in the console.

See the screenshot attached

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65 & FF 25
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Test62015&veaction=edit


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-02-28_at_5.21.25_PM.png (739×930 px, 123 KB)

Details

Reference
bz62088

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:06 AM
bzimport set Reference to bz62088.

In standalone demo empty.html

  1. Turn on 'get range on change', observe [1,1]
  2. Create heading, observe [1,1]
  3. Undo, observe [2,2]

Expected: Range is still [1,1] after undo

Change 116754 had a related patch set uploaded by Esanders:
Use previous breakpoint's range when undoing

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

Change 116754 merged by jenkins-bot:
Store previous range in breakpoint for undo

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

Verified the fix in test2 environment