[whatwg] Undo Manager specs is confusing in the contenteditable section

Rakesh Chaitanya KN kgdn63 at motorola.com
Wed Jun 20 22:15:39 PDT 2012


I just realized I missed adding Ryosuke in my previous mail, CC'ing now.

Hi,

Thanks for your reply.

On Thu, Jun 21, 2012 at 12:51 AM, Caio Marcelo de Oliveira Filho <
caio.oliveira at openbossa.org> wrote:

> Hi,
>
> > *2.2.1 Undo scope and contenteditable*
> > *
> > *
> > *When the contenteditable content attribute is added to an element, the
> > user agent must remove all entries in the undo transaction histories
> > of the editable
> > undo scope hosts that are descendent of the element and have become
> > editable without unapplying or reapplying the entries and disconnect the
> > corresponding UndoManagers as if the undoscope content attribute was
> > removed from all descendent nodes excluding undo scope hosts and their
> > descendents.*
> >
> > What does "editable undo hosts" imply here?
>
> From my understanding they are the elements that were undo hosts but
> now, because the addition of contenteditable content attribute, became
> editable elements, so not undo hosts anymore.
>
>
> > Also when contenteditable is added to an element all
> > the descendant elements become editable, so none of the descendants
> should
> > be a undo scope host as "undoscope content attribute on an editable
> element
> > is ignored". So is "*excluding undo scope hosts and their descendents*"
> > valid?
>
> We can have non-editable elements that are descendents of an element
> with contenteditable=true. For example:
>
> <div id="container">
>  <div id="A" undoscope>This will be editable</div>
>  <div id="B" contenteditable=false undoscope>This will remain not
> editable</div>
> </div>
>
> When div "container" gets contenteditable=true, the div "A" will have
> its undoManager disconnected, but not the div "B", because its not
> editable. Would a non-normative box with an example like this one be
> helpful in the spec?
>
>
Surely a example helps lot, may be a single example which covers most of
the scenarios might may help.

Maybe we could change the second paragraph of 2.2.1 to make things clearer:
>
> ----8<---
> When the contenteditable content attribute is added to an element, the
> user agent must remove all entries in the undo transaction histories
> of the descendents of the element that were undo scope hosts but have
> become editable without unapplying or reapplying the entries and
> disconnect the corresponding UndoManagers as if the undoscope content
> attribute was removed from the now editable descendent nodes.
> --->8---
>
> What do you think?
>
>
Looks good to me.

Cheers,
>
> --
> Caio Marcelo de Oliveira Filho
> openBossa @ INdT - Instituto Nokia de Tecnologia
>



-- 
Rakesh



More information about the whatwg mailing list