Page MenuHomePhabricator

VisualEditor: Link inspector crashes when trying to annotate first character in the document
Closed, ResolvedPublic

Description

Make a selection that includes the first character, and press the access key for creating a link (Ctrl+K?). You'll get a JS error.


Version: unspecified
Severity: normal

Details

Reference
bz47623

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:35 AM
bzimport set Reference to bz47623.

I wanted to check this out, and I noticed that this fails (I reproduced the error) in Chrome and Firefox 20.x in Windows, but it works perfectly (no crash on first character) in my Firefox 20.x in Ubuntu.

Also, if it helps, here's the error I'm getting on Firebug:

Error: Error in Rangy Position module: Cannot get position for range [WrappedRange(<P>[4][<a href="sdjfh" titl]:0, <P>[4][<a href="sdjfh" titl]:0)]
https://bits.wikimedia.org/www.mediawiki.org/load.php?debug=false&lang=en&modules=ext.visualEditor.core%2Cicons-raster%7Cext.visualEditor.viewPageTarget.icons-raster%7Crangy%7Cunicodejs.wordbreak&skin=vector&version=20130505T030747Z&*
Line 224

It seems it has something to do with the wordbreaks (??). Can there be a difference in wordbreaks that are used at the beginning of a document/paragraph between Linux and Windows? (Like ther'es a difference in endofline chars and whitespaces) ?

Not sure if it helps, but here's for sharing.

Mysteriously works upon updating to the current HEAD.