Page MenuHomePhabricator

VisualEditor: Snowmen inserted (or other bad breakage) with certain easy combinations of actions/keys that move the cursor out of the document
Closed, ResolvedPublic

Description

<Krenair> Move the cursor to the end of a line before the start of a new section header, delete, enter, enter, up, delete, type a random character.
<James_F> Backwards delete or forwards delete?
<Krenair> Um. The delete next to 'Home' and 'End'
<Krenair> not backspace
<James_F> Forwards, then. :-)
<James_F> Whee, snowmen.
<James_F> I blame edsanders.
<Krenair> observed on http://en.wikipedia.org/wiki/Hippeastrum_calyptratum, depending on what random character you try (I hit 'f'), stuff breaks in a difficult to explain but quite obvious
<Krenair> especially if you do it twice to the same document
<James_F> So the first thing that happens is that the cursor ends up outside of the document.
<James_F> Which is Bad™.
<James_F> Everything breaking after this is non-deterministic, but definitely also Bad™.


Version: unspecified
Severity: major

Details

Reference
bz64338

Event Timeline

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

If you put the cursor at the end of a paragraph and press Delete, the cursor will go to the top left corner of the surface (range (0,0)). However, if the next thing after the cursor is not a paragraph (but e.g. a heading) this doesn't happen.

Once the cursor is at (0,0) and you start typing, things break completely.

Change 129371 had a related patch set uploaded by Catrope:
Rerender selection after deleting.

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

Change 129371 merged by jenkins-bot:
Re-render selection after deleting

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