<?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>19316</bug_id>
          
          <creation_ts>2012-10-07 05:19:09 +0000</creation_ts>
          <short_desc>setRangeText() issues: Step 6, s/selection start/start/ s/selection end/end/. Step 8, &quot;select&quot; selectMode, s/selection end be end/selection end be start + the length of the value of the first argument/, similar issue in selectMode &quot;end&quot;.</short_desc>
          <delta_ts>2012-10-14 12:26:32 +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>HTML5 spec</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="Silvia Pfeiffer">silviapfeiffer1</reporter>
          <assigned_to name="Silvia Pfeiffer">silviapfeiffer1</assigned_to>
          <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</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>75502</commentid>
    <comment_count>0</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-10-07 05:19:09 +0000</bug_when>
    <thetext>Copy of WHATWG bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18337

Specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html
Multipage: http://www.whatwg.org/C#textFieldSelection
Complete: http://www.whatwg.org/c#textFieldSelection

Comment:
setRangeText() issues: Step 6, s/selection start/start/ s/selection end/end/.
Step 8, &quot;select&quot; selectMode, s/selection end be end/selection end be the
length of the value of the first argument/, similar issue in selectMode &quot;end&quot;.

Also, on step 5 of selectMode &quot;preserve&quot;:

[[
Otherwise: if selection end is greater than start, then set it to end.
]]

Seems the final &quot;end&quot; should be &quot;start + replacement.length()&quot;.

(Basically, it looks like &quot;end&quot; is generally confused to mean the end of the
replacement string, instead of the end index of what&apos;s meant to be replaced.)


This will apply WHATWG patches:
https://github.com/w3c/html/commit/32ec020284436740c6a177283d3dccd7735c299c
https://github.com/w3c/html/commit/0034b4b74dd118439beea53025b95cb52e092b79</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76237</commentid>
    <comment_count>1</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-10-14 12:26:32 +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-v2.html

Status: Accepted
Change Description:
https://github.com/w3c/html/commit/32ec020284436740c6a177283d3dccd7735c299c
https://github.com/w3c/html/commit/0034b4b74dd118439beea53025b95cb52e092b79
Rationale: accepted WHATWG change</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>