<?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>13830</bug_id>
          
          <creation_ts>2011-08-18 21:01:15 +0000</creation_ts>
          <short_desc>&quot;Delete the contents&quot; has to be rewritten to delete the selection</short_desc>
          <delta_ts>2011-08-30 19:54:50 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Aryeh Gregor">ayg</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <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>55442</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-18 21:01:15 +0000</bug_when>
    <thetext>Currently the &quot;delete the contents&quot; algorithm deletes any old range it&apos;s given.  Every caller except delete/forwardDelete actually deletes the active range.  The problem with deleting non-active ranges is it doesn&apos;t update the selection correctly.  Example: calling delete on

  &lt;ol&gt;&lt;li&gt;foo&lt;/li&gt;&lt;/ol&gt;{}&lt;br&gt;

produces

  &lt;ol&gt;&lt;li&gt;foo&lt;/li&gt;&lt;/ol&gt;{}

in the current spec because the selection doesn&apos;t get moved.  delete/forwardDelete can maybe be changed to change the selection before deleting.  Or maybe there&apos;s some other fix that&apos;s better.

(This is a minor bug in the current spec, not an issue implementers have to worry about.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56046</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-30 16:52:08 +0000</bug_when>
    <thetext>This is turning out to be a surprisingly big headache.  Apparently my algorithms are so complicated and/or poorly documented that I can&apos;t understand them a month or two after writing them.  I&apos;ll have to add more comments and/or refactor -- but for now, at least I have a good test suite!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56066</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-30 19:54:50 +0000</bug_when>
    <thetext>http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=bc8218cc

Filed bug 13973 on refactoring this so it&apos;s less of a nightmare.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>