Re: per-paragraph auto-direction, a.k.a. dir=uba

They would be quite different. <textarea readonly>:

   - is an inline element
   - has size controlled by rows and cols attribute; in some browsers, can
   be resized by the user
   - is submitted with form
   - receives focus and appears in taborder
   - has a border

On the other hand, <pre>:

   - is a block element
   - sized the same way as a div, e.g. can be minimal size needed to display
   content.
   - is not submitted with forms
   - does not receive focus or appear in taborder
   - does not have a built-in border

In all these respects, I would want the new element to be like <pre>, since
it is meant for the display of (pre-formatted plain-text) data. The only way
it is similar to <textarea> is that it does not allow mark-up and has a
modifiable value property.

Aharon

On Wed, Aug 25, 2010 at 9:09 PM, Ehsan Akhgari <ehsan@mozilla.com> wrote:

> On Wed, Aug 25, 2010 at 10:02 AM, Aharon (Vladimir) Lanin
> <aharon@google.com> wrote:
> > <textarea> allows user input, has the look and feel of an input (e.g. the
> > border around it), and serves as a field in a form.
> >
> > The new element is for display only, like <pre>.
>
> But textarea's already support all of the features that you have in
> mind.  Example:
>
> data:text/html,<textarea readonly
>
> style="border:none;overflow:none;resize:none">foo&#10;bar&#10;baz</textarea>
>
> I don't think that we should add a new HTML element, unless there's a
> compelling reason to do so.
>
> --
> Ehsan
> <http://ehsanakhgari.org/>
>

Received on Thursday, 26 August 2010 07:42:33 UTC