[whatwg] [editing] HTML Editing APIs specification ready for implementer feedback

Boris Zbarsky bzbarsky at MIT.EDU
Fri Aug 5 11:24:12 PDT 2011

On 8/5/11 1:59 PM, Aryeh Gregor wrote:
> Yeah, it's a problem.  The basic issue is that there are no standard
> interfaces to query things like "what's the height of this<br>?"

That depends on how you define "height" (esp when clearance is involved).

> or "are these two nodes in the same line box?"

This is, generally, a nonsensical question...

More precisely, the basic issue you're running into is that the CSS box 
model doesn't necessarily map onto most people's mental model of wysiwyg 
editing areas (insofar as such a thing even exists).

>> Right.  But you definitely don't want to place a caret / selection end point
>> inside a node with visibility : hidden.  So to that extent, you'd have to
>> mention it somewhere (definitely when you're normalizing selection end
>> points).
> Hmm, I'm not sure.  Text that's visibility: hidden looks the same to
> the user as text that's color: transparent, so why should it behave
> differently for selections?

It gets worse.  What about white text on a white background?  What about 
rgba(0, 0, 0, 0.01) text?  What about text with other stuff on top of 
it?  ;)


More information about the whatwg mailing list