W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: [UndoManager] Disallowing live UndoManager on detached nodes

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Wed, 22 Aug 2012 19:53:06 -0700
Message-ID: <CABNRm60r31ZUcsu4r1ZDN6d1xm98U0N-2tdpQ7d67RjZobgumw@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Jonas Sicking <jonas@sicking.cc>, Ehsan Akhgari <ehsan@mozilla.com>, Sukolsak Sakshuwong <sukolsak@google.com>, Kentaro Hara <haraken@chromium.org>, Adam Barth <abarth@webkit.org>, Maciej Stachowiak <mjs@apple.com>, Olli Pettay <Olli.Pettay@helsinki.fi>, public-webapps <public-webapps@w3.org>, Ojan Vafai <ojan@chromium.org>
On Aug 22, 2012 7:40 PM, "Glenn Maynard" <glenn@zewt.org> wrote:
> On Wed, Aug 22, 2012 at 8:49 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:
>> On Wed, Aug 22, 2012 at 5:55 PM, Glenn Maynard <glenn@zewt.org> wrote:
>>> On Wed, Aug 22, 2012 at 7:36 PM, Maciej Stachowiak <mjs@apple.com>
>>>> Ryosuke also raised the possibility of multiple text fields having
separate UndoManagers. On Mac, most apps wipe they undo queue when you
change text field focus. WebKit preserves a single undo queue across text
fields, so that tabbing out does not kill your ability to undo. I don't
know of any app where you get separate switchable persistent undo queues.
Thins are similar on iOS.
>>> Firefox in Windows has a separate undo list for each input.  I would
find a single undo list strange.
>> Internet Explorer and WebKit don't.
> The point is that this shouldn't be designed with the expectation that
Firefox will change its undo mechanics to suit it.

Of course, not. That's why I said the default behaivor may need to depend
on the platform convention. Maybe we can add a content attribute or IDL
attibute to form controls to control its behavior.

>> While we're probably all biased to think that what we're used to is the
best behavior, it's important to design our API so that implementors need
not to violate platform conventions. In this case, it might mean that
whether text field has its own undo manager by default depends on the
platform convention.
> Dialogs in Windows get separate undo for isolated controls by default, so
that's what most applications do.  Many applications also have a single
undo list for whole documents.

Right. This is probably the artifact of "Edit" window instance having its
own undo manager. But really, Windows doesn't provide any native undo
manager at Win32 API level so applications are free todo whatever they like
upon receiving WM_UNDO and WM_REDO. On the other hand, Mac has
NSUndoManager at NSWindow level and so each window (not view) normally have
a single undo manager.

- Ryosuke
Received on Thursday, 23 August 2012 02:53:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:38 UTC