<?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>16094</bug_id>
          
          <creation_ts>2012-02-23 20:43:03 +0000</creation_ts>
          <short_desc>Editing commands should do nothing if the selection isn&apos;t fully contained in a single editing host</short_desc>
          <delta_ts>2012-02-24 17:29:29 +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>64504</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-23 20:43:03 +0000</bug_when>
    <thetext>(In reply to bug 13118 comment #20)
&gt; I think similar problems can arise with selections spanning non-nested editing
&gt; hosts, or outside of editing hosts entirely.  E.g., per current spec, running
&gt; &quot;indent&quot; on
&gt;   foo&lt;div style=display:inline contenteditable=true&gt;bar&lt;/div&gt;[baz]
&gt; will actually produce
&gt;   foo&lt;div style=display:inline
&gt; contenteditable=true&gt;&lt;blockquote&gt;bar&lt;/blockquote&gt;&lt;/div&gt;[baz]
&gt; or something, I think.  This is probably just a spec bug, though!  Probably
&gt; block-extending the selection shouldn&apos;t cross editing hosts.
&gt; 
&gt; So we should try to make sure that commands don&apos;t affect any editing hosts that
&gt; aren&apos;t ancestors of some node that&apos;s contained or partially contained in the
&gt; selection?

This should be changed.  If the selection doesn&apos;t touch an editing host, commands should never affect it.  Likewise, if multiple beforeInput events get fired at different editing hosts, canceling some should make the command not affect that editing host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64505</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-23 20:53:50 +0000</bug_when>
    <thetext>(I&apos;m not prioritizing this, because it only comes up if the page has multiple editing hosts, which isn&apos;t so common.  And even then only in corner cases.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64506</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-23 21:11:57 +0000</bug_when>
    <thetext>After some discussion with rniwa in #whatwg: we should probably just say that if the selection is not fully contained in a single editing host, execCommand() does nothing.  Probably queryCommandEnabled() should return false in this case.  Then all this becomes simple.  I&apos;ll try doing that now, perhaps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64557</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-24 17:29:29 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/editing/rev/33d0413c3be8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>