Page MenuHomePhabricator

VisualEditor: Put block slugs in the DM rather than fake them in CE
Closed, ResolvedPublic

Description

The concept of a block slug from a UX POV is great, but why do we need to keep them out of the DM? It seems to be the source of far too many getOffset hacks, as you can put your cursor somewhere that doesn't have a real offset (model-view inconsistency). We already have a way of marking a paragraph as to-be-ignored-by-the-converter-if-empty ({internal:'empty'}), so let's just put them in the DM, and throw them away at convert time if they're empty.


Version: unspecified
Severity: enhancement

Details

Reference
bz65052

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:10 AM
bzimport set Reference to bz65052.

Also if we do this we can force the SurfaceObserver to always move cursor positions to content offsets (except for FocusableNodes) which should prevent bugs like Firefox select-all giving you [0,data.length].

Change 135131 had a related patch set uploaded by Jforrester:
Stage slugs

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

Change 135131 had a related patch set uploaded by Catrope:
Stage slugs

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