W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2012

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

From: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Date: Wed, 20 Jun 2012 16:21:19 -0300
Message-ID: <CAM1FioK3TifBCZPCk-q+ktDXcXd+ApY_yc4-c8SBxGHACeg_Tg@mail.gmail.com>
To: Rakesh Chaitanya KN <kgdn63@motorola.com>
Cc: whatwg@whatwg.org
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?

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?


Cheers,

-- 
Caio Marcelo de Oliveira Filho
openBossa @ INdT - Instituto Nokia de Tecnologia
Received on Wednesday, 20 June 2012 19:21:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC