[Bug 19316] New: 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".

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19316

           Summary: 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".
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
        AssignedTo: silviapfeiffer1@gmail.com
        ReportedBy: silviapfeiffer1@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


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

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Sunday, 7 October 2012 05:19:15 UTC