Page MenuHomePhabricator

VisualEditor: Things are sometimes alienated as block when they should be inline
Closed, ResolvedPublic

Description

"phantoms" text is wrapped into a "div class="ve-ce-phantoms" " which adds a linebreak because div is a block element, see https://en.wikipedia.org/wiki/User:Raymond/nowiki

Better to use a span I think.


Version: unspecified
Severity: normal

Details

Reference
bz43056

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:10 AM
bzimport set Reference to bz43056.

Fixing summary. Editable nodes are called "aliens". The "phantom" is the green hatched-out overlay that appears when mousing over an alien. It's an absolutely positioned <div> that exists outside of the main editor DOM. Because of the mouseover effect, you can't actually inspect the aliens themselves easily, but when you do, you'll find that the actual uneditable content is in <div class="ve-ce-alienBlock"> or <span class="ve-ce-alienInline"> as appropriate.

The issue here is that some things (nowikis in Raymond's example, and I've seen some references do it in the wild) are alienated as alienBlock nodes by ve.dm.Converter when they should really be alienInline nodes.

Merged; code will be deployed as part of the 2013-01-16 release cycle.