<?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>13909</bug_id>
          
          <creation_ts>2011-08-26 00:05:10 +0000</creation_ts>
          <short_desc>Selections have three possible directions, not two</short_desc>
          <delta_ts>2014-04-22 07:13:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Selection API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>ayg</cc>
    
    <cc>benjamp</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>rniwa</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55828</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-26 00:05:10 +0000</bug_when>
    <thetext>On Mac, a newly created selection is by default neither forward nor backward. See the equivalent text in the HTML spec for input elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55927</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-28 15:39:36 +0000</bug_when>
    <thetext>I don&apos;t have a Mac handy for testing, so I don&apos;t know how browsers behave on Mac.  If anyone wants to tell me how the spec should change to match browsers, please do.  Adding an explicit settable selection direction property on the Selection interface would also be useful, of course . . .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57177</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-09-22 19:31:19 +0000</bug_when>
    <thetext>Moving Selection-related bugs to editing: see bug 14248, bug 14252.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58276</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-10-15 20:28:39 +0000</bug_when>
    <thetext>Selection on Mac is directionless at the beginning. Selection gets a direction when setBaseAndExtent is called on getSelection() or base, extent, focus, or anchor of getSelection() is modified, or selection is extended via arrow keys.

See http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-selectiondirection</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104122</commentid>
    <comment_count>4</comment_count>
    <who name="Ben Peters">benjamp</who>
    <bug_when>2014-04-21 21:09:19 +0000</bug_when>
    <thetext>Moving to Selection API component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104146</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-04-22 07:13:39 +0000</bug_when>
    <thetext>I&apos;ve fixed this when I ported the specification: http://rniwa.github.io/selection-api.html#dfn-direction

&quot;Each selection has a direction, forwards, backwards, or directionless. If the user creates a selection by indicating first one boundary point of the range and then the other (such as by clicking on one point and dragging to another), and the first indicated boundary point is after ([DOM4]) the second, then the corresponding selection must initially be backwards. If the first indicated boundary point is before ([DOM4]) the second, then the corresponding selection must initially be forwards. Otherwise, it must be directionless.&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>