<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13482</bug_id>
          
          <creation_ts>2011-07-31 07:52:32 +0000</creation_ts>
          <short_desc>dir=auto needs to work on value of input and textarea elements</short_desc>
          <delta_ts>2011-08-25 03:25:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aharon Lanin">aharon.lists.lanin</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ehsan</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>yael.aharon</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51853</commentid>
    <comment_count>0</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-07-31 07:52:32 +0000</bug_when>
    <thetext>As currently specified (http://dev.w3.org/html5/spec/Overview.html#the-dir-attribute), dir=auto determines an element&apos;s directionality by scanning the element&apos;s text node descendants.

Unfortunately, this spec does not give sufficient consideration to &lt;input&gt; and &lt;textarea&gt; nodes, for which dir=auto was always envisioned to work based on their current value, i.e. to potentially change the element&apos;s directionality when the user types into them. As a result, dir=auto as currently implemented in WebKit does not do anything useful for input elements, and only works on a textarea&apos;s initial value, without changing as the user modifies it.

Furthermore, a dir=auto element&apos;s directionality should not be dependent on the text nodes in a descendant &lt;textarea&gt;, since these usually do not change dynamically when the user types into the textarea, and since a textarea should behave in this regard just like an input element.

Thus:

- For input and textarea elements with dir=auto, the directionality should be determined not by the element&apos;s descendants, but by the element&apos;s current value, and should change as the latter changes.

- For other elements, the text node descendants under a descendant textarea element should be excluded, just like those in script and style elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52259</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-03 21:31:57 +0000</bug_when>
    <thetext>Seems reasonable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52841</commentid>
    <comment_count>2</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:04:42 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54725</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-11 21:12:46 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54726</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-08-11 21:13:01 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6420.
Check-in comment: fix dir=auto for &lt;textarea&gt; and &lt;input&gt; text fields.
http://html5.org/tools/web-apps-tracker?from=6419&amp;to=6420</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54757</commentid>
    <comment_count>5</comment_count>
    <who name="Aharon Lanin">aharon.lists.lanin</who>
    <bug_when>2011-08-12 04:00:12 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Checked in as WHATWG revision r6420.

The fix looks good to me. I will close the bug in a few days. Just want to let others have a look at it first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55789</commentid>
    <comment_count>6</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-25 03:23:32 +0000</bug_when>
    <thetext>Looks very good to me, thanks!  I&apos;ll update the Mozilla bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>