[whatwg] Should a textarea outside of a document be immutable?
ian at hixie.ch
Wed Jun 13 16:11:45 PDT 2012
On Mon, 14 May 2012, Mounir Lamouri wrote:
> According to the HTML specifications, a textarea is mutable "if it is
> neither disabled nor has a readonly attribute specified". Which means
> that a textarea outside of a document is mutable. This is not the case
> for an input element.
> I was wondering why there is this difference in behavior here between
> those two elements. I believe both elements should be immutable when
> outside of a document.
The requirement for <input> was the remnants of an attempt to define
something better in the context of XBL2. I've dropped it.
Elements that are not in the document, or indeed that are in a document
without a browsing context, or are display:none, or children of an element
that doesn't represent its contents (e.g. <br>, <img>, <object> in some
cases, <video>, <audio>, etc), or scrolled off the screen, or overlapped
by some other element, or any number of other cases, can't typically be
edited. The spec does allow UAs to allow users to edit them in all these
cases, but only requires it as a "SHOULD"; the inability for the user to
reach the element at all in these cases is considered a reasonable reason
to not implement the requirement in those cases.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg