W3C home > Mailing lists > Public > public-html-comments@w3.org > April 2011

Re: What are we trying to solve with document.designMode?

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Tue, 26 Apr 2011 18:53:59 +0300
Message-ID: <D749810F105343558EE643C4AC50FBAD@JukanPC>
To: <benjamin.poulain@nokia.com>, <public-html-comments@w3.org>
benjamin.poulain@nokia.com wrote:

> I was looking at behavior differences between browsers and the spec
> regarding document.designMode.

It seems that the major difference is that the clause
does not say that setting designMode to "on" disabled script execution. This 
common browser behavior (IE, Firefox, Opera, though not Chrome) is a useful 
feature (though it makes me wonder how the setting could ever change then). 
It is useful because otherwise editing of content might be obstructed by 
JavaScript handling of e.g. click events.

> The way the attribute is defined in the spec makes it just another
> way to formulate contentEditable for the document.

Adding a statement about disabling scripts would make a big difference.

> The implementation differs from the specification in the sense that
> you cannot override the designMode by a child with contentEditable.

Perhaps there are implementation difficulties, or implementors just decided 
that document.designMode really means that the entire document is editable. 
In any case, clarification is needed; the spec should either clearly say 
that contentEditable overrides document.designMode (it is now said in a 
grammatically rather complex statement, or it should say the opposite.

The possibility of overriding document.designMode on a per-element basis is 
less important that the document.designMode property itself. If you don't 
like the effect of document.designMode on the document, don't use it - you 
can always set <body contenteditable> if that's what you want, and 
comfortably override it for some element(s).

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Tuesday, 26 April 2011 15:54:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:27 UTC