<?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>13910</bug_id>
          
          <creation_ts>2011-08-26 00:11:41 +0000</creation_ts>
          <short_desc>There can never be no active range</short_desc>
          <delta_ts>2011-10-04 18:59:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - HTML Editing APIs</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <cc>ehsan</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact name="HTML Editing APIs spec bugbot">sideshowbarker+html-editing-api</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55829</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-26 00:11:41 +0000</bug_when>
    <thetext>According to DOM Range, there&apos;s always a selection; if it&apos;s empty, it is just one range with start=end.

This means there&apos;s always an active range, so the Editing spec doesn&apos;t need to say it can be null.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55890</commentid>
    <comment_count>1</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-26 18:23:14 +0000</bug_when>
    <thetext>What if Selection.removeAllRanges is called?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55929</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-28 15:43:41 +0000</bug_when>
    <thetext>According to DOM Range, there&apos;s always a selection, but it might have zero ranges.  getSelection().getRangeAt(0) will then throw INDEX_SIZE_ERR.  In that case, there will be no active range.  This is how browsers all behave -- the selection in a new document will have no ranges in it.  And the selection must have no ranges in it after removeAllRanges() is called, as Ehsan points out.

Is there any specific text in DOM Range that led you to think otherwise?  If so, I&apos;ll fix it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>