This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19316 - setRangeText() issues: Step 6, s/selection start/start/ s/selection end/end/. Step 8, "select" selectMode, s/selection end be end/selection end be start + the length of the value of the first argument/, similar issue in selectMode "end".
Summary: setRangeText() issues: Step 6, s/selection start/start/ s/selection end/end/....
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Silvia Pfeiffer
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-07 05:19 UTC by Silvia Pfeiffer
Modified: 2012-10-14 12:26 UTC (History)
3 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2012-10-07 05:19:09 UTC
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, "select" selectMode, s/selection end be end/selection end be the
length of the value of the first argument/, similar issue in selectMode "end".

Also, on step 5 of selectMode "preserve":

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

Seems the final "end" should be "start + replacement.length()".

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


This will apply WHATWG patches:
https://github.com/w3c/html/commit/32ec020284436740c6a177283d3dccd7735c299c
https://github.com/w3c/html/commit/0034b4b74dd118439beea53025b95cb52e092b79
Comment 1 Silvia Pfeiffer 2012-10-14 12:26:32 UTC
EDITOR'S RESPONSE: This is an Editor'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