<?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>14578</bug_id>
          
          <creation_ts>2011-10-27 21:00:24 +0000</creation_ts>
          <short_desc>Figure out how to behave if editing host is an inline element</short_desc>
          <delta_ts>2012-12-04 02:03:27 +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>NEW</bug_status>
          <resolution></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>ehsan</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
    
    <cc>rniwa</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>59103</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-10-27 21:00:24 +0000</bug_when>
    <thetext>Currently I generally just don&apos;t test this case.  Example: what happens if you run insertOrderedList on &lt;span contenteditable&gt;foo[]&lt;/span&gt;?

IE9: &lt;span contentEditable=&quot;&quot;&gt;&lt;p&gt;foo&lt;/p&gt;&lt;/span&gt;
Firefox 9.0a2: Throws NS_ERROR_FAILURE
Chrome 16 dev: &lt;span contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;foo&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;
Opera 11.50: Throws NOT_FOUND_ERR

How about &lt;div contenteditable&gt;&lt;span contenteditable&gt;foo[]&lt;/span&gt;&lt;/div&gt;?

IE9: &lt;div contentEditable=&quot;&quot;&gt;&lt;span contentEditable=&quot;&quot;&gt;&lt;p&gt;foo&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
Firefox 9.0a2: &lt;div contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;&lt;span contenteditable=&quot;&quot;&gt;foo&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
Chrome 16 dev: &lt;div contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;foo&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
Opera 11.50: &lt;div contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;&lt;span contenteditable=&quot;&quot;&gt;foo&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;

&lt;span contenteditable&gt;&lt;ul&gt;&lt;li&gt;foo[]&lt;/ul&gt;&lt;/span&gt;?

IE9: &lt;span contentEditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;foo&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;
Firefox 9.0a2: NS_ERROR_FAILURE
Chrome 16 dev: &lt;span contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;foo&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;
Opera 11.50: &lt;span contenteditable=&quot;&quot;&gt;&lt;ol&gt;&lt;li&gt;foo&lt;/ol&gt;&lt;/span&gt;

I see three sensible options:

1) Pretend the editing host isn&apos;t inline, and give it block children.

2) Silently refuse to add new block elements if there&apos;s no ancestor in the same editing host that they&apos;re allowed children of, but otherwise execute the commands normally.  E.g., insertOrderedList should refuse to insert lists but should change existing &lt;ul&gt;s.

3) Bail out of all block-level commands unconditionally if the editing host is inline.

I&apos;m leaning toward (2).  Opinions?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>