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

bzimport set Reference to bz54446.
Krinkle created this task.Via LegacySep 22 2013, 7:21 AM
Krinkle added a comment.Via ConduitSep 22 2013, 7:26 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:

Esanders added a comment.Via ConduitSep 24 2013, 3:32 PM

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.

gerritbot added a comment.Via ConduitSep 24 2013, 3:56 PM

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

gerritbot added a comment.Via ConduitSep 24 2013, 5:21 PM

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