[whatwg] textarea semantics for wrap, readonly, and disabled

Ian Hickson ian at hixie.ch
Fri Sep 4 14:54:14 PDT 2009


On Wed, 2 Sep 2009, Dirk Pranke wrote:
> 
> In testing various combinations of attributes on textareas, I've found a 
> couple of inconsistencies and some vagueness in the spec.
> 
> 1) The wrap="hard" attribute appears to be defined such that you get 
> hard line breaks at the specified character width of the element, but 
> the semantics of the wrap="soft" attribute are not defined.

The smenatics of "soft" are "do nothing special".


> And, in admittedly limited testing, WebKit, Gecko, and Trident all 
> treated soft as if it was hard. Opera 10 seems to treat hard as if it 
> was soft, meaning that it does not force linebreaks at the specified 
> character width, and content overflowed (without a scroll bar being 
> displayed). What are the semantics of wrap="soft" supposed to be?

Wrap, but don't insert hard line breaks when submitting. Pretty much 
exactly what HTML5 says.


> 2) wrap="off" does not appear to be a legitimate value, despite being 
> implemented in all the major browsers. Is this an oversight, or an 
> intentional omission?

It's intentionally non-conforming, but it's processing is defined in the 
rendering section:

http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element-0


> 2) If the textarea is specified as "disabled", but the text overflows 
> the alloted size, should the scrollbars be enabled so you can scroll to 
> see the content, or should the scrollbars be disabled (preventing the 
> user from seeing the content)?

That's UA-defined.


On Wed, 2 Sep 2009, Dirk Pranke wrote:
> 
> Ah, in 11.4.15. It seems like it would be useful to note that as a 
> historical value in 4.10.10, or perhaps somewhere else like the obsolete 
> section?

It was never allowed, so it's not obsolete. (There are some things that 
were never allowd and are listed as obsolete, but that's just because I 
needed somewhere to define their processing.)


> On the flip side, should 11.4.15 specify anything about wrapping 
> algorithms of soft vs. hard, or is that completely implementation 
> defined (including handling of overflow with scrollbars, etc.)?

Implementation-defined.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list