<?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>11699</bug_id>
          
          <creation_ts>2011-01-08 16:20:12 +0000</creation_ts>
          <short_desc>When calling input.focus(), should (a) the cursor be at the start, (b) the cursor be at the end or (c) the contents be selected? Please define</short_desc>
          <delta_ts>2011-08-04 05:34:12 +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>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=408595</see_also>
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#focus-management</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Disagree</keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>shadow2531</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>43942</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-01-08 16:20:12 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#focus-management

Comment:
When calling input.focus(), should (a) the cursor be at the start, (b) the
cursor be at the end or (c) the contents be selected? Please define

Posted from: 91.181.240.75 by ms2ger@gmail.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44663</commentid>
    <comment_count>1</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-24 16:10:04 +0000</bug_when>
    <thetext>I wonder if we couldn&apos;t let .focus() behavior be the one used by the system and require authors to use .setSelectionRange() if they need to cursor to be at a specific position?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44782</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-01-27 00:10:51 +0000</bug_when>
    <thetext>What&apos;s &quot;the one used by the system&quot; supposed to be?  Normally you&apos;d focus things by clicking on them, which would place the cursor where you click.  So you mean what you&apos;d get by alt-tabbing to it?  Do platforms actually differ on where the cursor goes then?  (Linux seems to select the contents.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44805</commentid>
    <comment_count>3</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-27 15:30:10 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; So
&gt; you mean what you&apos;d get by alt-tabbing to it?  Do platforms actually differ on
&gt; where the cursor goes then?  (Linux seems to select the contents.)

For example, yes. But the idea is it doesn&apos;t seem to be very useful to specify that given that an API is available to set the cursor wherever the author wants.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44808</commentid>
    <comment_count>4</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-01-27 19:08:44 +0000</bug_when>
    <thetext>I don&apos;t get what you&apos;re saying.  Surely it&apos;s always good to specify things exactly so that browsers are interoperable, even if there are clearer ways of doing the same thing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44837</commentid>
    <comment_count>5</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-28 14:56:30 +0000</bug_when>
    <thetext>What I meant is it&apos;s better to request the UA to behave like the system usually behave to keep some consistency. If we do that, authors would not be able to [sanely] rely on a particular behavior but given that we have the selection API, it doesn&apos;t seem to be a big deal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44861</commentid>
    <comment_count>6</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-01-28 21:07:55 +0000</bug_when>
    <thetext>Is platform consistency relevant to focus()?  Would users expect behavior of focus() to match the platform behavior of tabbing to the field?  That seems unlikely to me, unless it&apos;s being used specifically to emulate tabbing for some reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44883</commentid>
    <comment_count>7</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-29 23:31:04 +0000</bug_when>
    <thetext>Given that systems might have different behavior for that and the web platform has an API to override this behavior, it doesn&apos;t sound really important to force all UAs to have the same behavior on all platforms.
FWIW, a lot of things in focus management seems to be &quot;do whatever the platform do&quot;.

Anyway, that&apos;s no big deal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45849</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-02-19 00:11:03 +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.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: It&apos;s platform-specific, but I&apos;ve explicitly called out where it has to happen if it happens.

(It has to be platform-specific, because users will complain if, e.g., tabbing to a field doesn&apos;t do the same thing as in other apps on their platform.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45851</commentid>
    <comment_count>9</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-02-19 00:26:18 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5911.
Check-in comment: Define when the platform-specific focusing behavior happens relative to focus events, etc.
http://html5.org/tools/web-apps-tracker?from=5910&amp;to=5911</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53889</commentid>
    <comment_count>10</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:34:12 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>