Page MenuHomePhabricator

VisualEditor: Still get a pawn when select-all->replace in Firefox
Closed, ResolvedPublic

Description

Go to demos/ve/?page=aliens in Firefox; select all:

TypeError: end is undefined    ve.ce.Surface.js (line 980)

Press "a" (or backspace and then "a"):

TypeError: start is undefined  ve.ce.Surface.js (line 995)

(And a pawn appears in its own <p> above the a.)

On any click thereafter,

TypeError: node is null        ve.ce.Surface.js (line 1073)

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

Details

Reference
bz42404

Event Timeline

I resolved this in Ia7347527e6466262e819f456404b32926fd95e34 by correcting the offsets before showing selection. This seems to work well so far, but really getNodeAndOffset is a nasty function that needs some love soon.