W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Fixing undo on the Web - UndoManager and Transaction

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 5 Aug 2011 09:57:52 -0700
Message-ID: <CA+c2ei_1Ow628fbs_mKXBrg_caZAONzYb7_PKg_evdHY=F9u=g@mail.gmail.com>
On Aug 4, 2011 5:31 PM, "Ryosuke Niwa" <rniwa at webkit.org> wrote:
>
> On Wed, Aug 3, 2011 at 2:46 PM, Anne van Kesteren <annevk at opera.com>
wrote:
>>
>> On Wed, 03 Aug 2011 23:40:27 +0200, Ryosuke Niwa <rniwa at webkit.org>
wrote:
>>>
>>> On Wed, Aug 3, 2011 at 2:36 PM, Anne van Kesteren <annevk at opera.com>
wrote:
>>>>
>>>> If they are identical I think it is even more clear we should remove
the
>>>> one on Document as it's redundant :-)
>>>
>>>
>>> Mn... but I think it's more convenient to be able to access undoManager
from document.  Also, what if there were no body?  undoManager needs to
exist in such cases as well (e.g. designMode).
>>
>>
>> <body> is not the root element. And if there is no root element there is
nothing visible on the screen so I am not sure it matters if things are lost
in that case. That is such an edge case and not really worth having an
additional member on Document for.
>
>
> Not sure.  This happens all the time in design mode.  We've had plenty of
crash reports that only reproduce when there are no document element.
>
> It might also be hard to implement such a behavior in WebKit at least
because documents / frames have the undo stack managed by OS X or embedders
and having to fake non-existence of the undo stack might be tricky.

Why treat documentElement specially here? Just make the documentElement
*not* have a undoManager by default and have it just use it's ancestor's,
just like all other elements.

The document is an ancestor of the documentElement after all.

/ Jonas
Received on Friday, 5 August 2011 09:57:52 UTC

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