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

[whatwg] Automatic transaction should support changing the value of input/textarea

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Sun, 27 Nov 2011 22:22:22 -0800
Message-ID: <CABNRm63u2FsNRAahcP1vWsQ688oJxwac0UDz3HRY=w6SSAH5Uw@mail.gmail.com>
On Sun, Nov 27, 2011 at 10:13 PM, Jonas Sicking <jonas at sicking.cc> wrote:

> Another option is to say that if the textarea value is any other value
> than the "after" value when a automatic transaction is undone, it
> doesn't do anything.


Yeah, I've thought about this as well. However, the UA has to store the
original data anyway because we can have scenarios like:

   1. input.value is set to "foo"
   2. Script runs input.value = "hi" inside an automatic transaction
   3. Another script modifies it to "foo bar"
   4. Yet another script modifies it to "hi"

At this point, input.value is "hi" and matches the "after" value in step 2.
However, natively undoing the transaction won't get us anywhere.

Or did I misunderstand something?

- Ryosuke
Received on Sunday, 27 November 2011 22:22:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:38 UTC