- From: Olivier Forget <teleclimber@gmail.com>
- Date: Tue, 16 Dec 2014 18:17:08 +0000
- To: Johannes Wilm <johannes@fiduswriter.org>, Frederico Knabben <f.knabben@cksource.com>
- Cc: Ben Peters <Ben.Peters@microsoft.com>, Koji Ishii <kojiishi@gmail.com>, "public-editing-tf@w3.org" <public-editing-tf@w3.org>
- Message-ID: <CAA5DY6ZuR0gK5V31nESzNDg0USdGzN-p9WBOLMxf6b9_R=Xdew@mail.gmail.com>
On Mon Dec 15 2014 at 2:11:06 PM Johannes Wilm <johannes@fiduswriter.org> wrote: > Hey, > if we do as proposed, think about this example: > > <div style="display:none;"> > <div contenteditable=true> > Hello <span style="display:none">Austria</span>! > </div> > </div> > > > If I understand you right, you want to ignore the outer display:none for > editing purposes, but respect the inner one? > Absolutely not, no. That would be wrong. Any descendant of display:none is considered to be invisible and treated as such wrt caret movement. > > I can see how that may be practical for certain purposes, but correct me > if I'm wrong, it seems like until now there was only one level something > could be display:none. Now if we choose to go this route, we will have > several layers. > > We could even go further: > > <div style="display:none;"> > <div contenteditable=true> > Hello <span style="display:none"><span > contenteditable=true>Austria</span></span>! > </div> > </div> > > > Now we would have two (offscreen) contenteditable areas, one within the > other, but the outer one will ignore the inner one when it comes to caret > movement, while the inner one is self-contained. I can see how that could > come in handy for some things. > In your example above there is no caret anywhere at all ever because it's all wrapped in a display:none. > > How about CSS specs? It seems at least the definition of display:none > would need to be amended slightly: > http://www.w3.org/TR/CSS2/visuren.html#display-prop > > "none: This value causes an element to not appear in the formatting > structure (i.e., in visual media the element generates no boxes and has no > effect on layout). Descendant elements do not generate any boxes either; > the element and its content are removed from the formatting structure > entirely. This behavior cannot be overridden by setting the 'display' > property on the descendants. > > Please note that a display of 'none' does not create an invisible box; it > creates no box at all. CSS includes mechanisms that enable an element to > generate boxes in the formatting structure that affect formatting but are > not visible themselves. Please consult the section on visibility for > details." > > -- > Johannes Wilm > Fidus Writer > http://www.fiduswriter.org >
Received on Tuesday, 16 December 2014 18:17:36 UTC