VisualEditor: Editor incorrectly selects slug and infobox onload
Closed, ResolvedPublic

Description

Details

Reference
bz54446
Krinkle created this task.Sep 22 2013, 7:21 AM

Created attachment 13347
Screenshot of page after trying to Undo

Causes loss of data as it makes it really easy to accidentally delete that selection when you start typing.

When you then try to do Undo, the following exception is thrown:

Uncaught Error: Cannot roll back a transaction that has not been committed

Also, for some reason the font has become noticably smaller (only in the affected paragraph; see screenshot)

Attached:

This is cause by ve.ce.Surface#showSelection not being aware of the slug at the start of the document. Also, because the focusableNode logic takes places before showSelection is called, it tries to do a native selection.

Change 85866 had a related patch set uploaded by Esanders:
Detect collapsed range inside focusable node in ve.ce.Surface#onChange

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

Change 85866 merged by jenkins-bot:
Detect collapsed range inside focusable node in ve.ce.Surface#onChange

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

Add Comment