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 13411 - The spec for setting selectionEnd seems incorrect (or at least incompatible with the symmetric selectionStart case)
Summary: The spec for setting selectionEnd seems incorrect (or at least incompatible w...
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 16:07 UTC by Ehsan Akhgari [:ehsan]
Modified: 2011-08-17 22:44 UTC (History)
6 users (show)

See Also:


Attachments

Description Ehsan Akhgari [:ehsan] 2011-07-28 16:07:39 UTC
For selectionStart, the spec says:

"On setting, it must act as if the setSelectionRange() method had been called, with the new value as the first argument; the current value of the selectionEnd attribute as the second argument, unless the current value of the selectionEnd is less than the new value, in which case the second argument must also be the new value; and the current value of the selectionDirection as the third argument."

For selectionEnd, it says:

"On setting, it must act as if the setSelectionRange() method had been called, with the current value of the selectionStart attribute as the first argument, the current value of the selectionEnd attribute as the first argument, and the new value as the third argument."

That sentence is wrong :-)  Also, I think we should explicitly mention that if the new value is less than the current value of selectionStart, the first argument should also be the new value.
Comment 1 Michael[tm] Smith 2011-08-04 05:35:12 UTC
mass-move component to LC1
Comment 2 Ian 'Hixie' Hickson 2011-08-17 22:44:50 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.html

Status: Accepted
Change Description: no spec change
Rationale: The copypasta error seems fixed already. The other things doesn't need to be done because setSelectionRange() also does that check. It's just special for selectionState because we need the opposite than normal behaviour.