[whatwg] Undoscopes inside an editable region should ignored

On Thu, Oct 13, 2011 at 6:43 PM, Anne van Kesteren <annevk at opera.com> wrote:

> On Fri, 14 Oct 2011 05:07:18 +0900, Ryosuke Niwa <rniwa at webkit.org> wrote:
>
>> On Tue, Oct 11, 2011 at 1:02 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:
>>
>>> This sounds reasonable. The content attribute should be made
>>>> non-conforming in that case. Perhaps the IDL attribute should throw
>>>> on setting? Maybe better to just do nothing, but that doesn't give
>>>> the author any idea of what's wrong.
>>>>
>>>> Right.
>>>>
>>>
>>> FWIW, I think we should throw in this case.
>>>
>>
>> Suggestions on which exception to throw?
>>
>
> Given that you could just set the content attribute instead, throwing for
> the IDL attribute makes little sense to me. It seems better to just let it
> function per its normal rules and have any such attributes be non-conforming
> and ignored.
>

I agree.

On the larger proposal, this seems reasonable to me for undoscope in
editable regions to be ignored as long as we allow undoscope on a nested
contentEditable=false element, e.g. the following case should be valid:

<div contentEditable undoscope>
  <div contentEditable=false undoscope></div>
</div>

The two divs would have different undo stacks. This allows you to create
widgets inside editable areas that have their own undo stack.

When an element with an undoscope goes from editable to non-editable, does
it then get a fresh undo stack? When it goes from non-editable to editable
does it lose it's undo stack? I think the answer to both those questions
should be yes, but I'm not 100% convinced.

ojan

Received on Thursday, 13 October 2011 19:06:26 UTC