<?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>13839</bug_id>
          
          <creation_ts>2011-08-19 18:39:19 +0000</creation_ts>
          <short_desc>Merge adjacent inline markup when deleting</short_desc>
          <delta_ts>2015-07-30 23:47:08 +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>Linux</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>enhancement</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>
          <deadline>2015-07-30</deadline>
          <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>55494</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-19 18:39:19 +0000</bug_when>
    <thetext>WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=12322

So for instance, if you delete the space in &lt;b&gt;foo&lt;/b&gt; &lt;b&gt;bar&lt;/b&gt;, it should be &lt;b&gt;foobar&lt;/b&gt;, not &lt;b&gt;foo&lt;/b&gt;&lt;b&gt;bar&lt;/b&gt;.  This is not a common issue, but it might be nice to have eventually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55560</commentid>
    <comment_count>1</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-22 03:30:14 +0000</bug_when>
    <thetext>Wouldn&apos;t this lead to surprises if the user is interacting with the text?  Imagine this markup: &lt;b&gt;foo&lt;/b&gt; b|&lt;b&gt;ar&lt;/b&gt;.  I would expect the following sequence of keys to produce the original markup (i.e., the entered b not being bold).

backspace, backspace, space, b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55589</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-22 19:22:57 +0000</bug_when>
    <thetext>Interesting point.  Word 2007, Firefox 8.0a2, and Chrome 15 dev all behave as you describe.  IE10PP2 and Opera 11.50 make the newly-typed &quot; b&quot; bold, although they don&apos;t merge the &lt;b&gt;&apos;s.

But this proposal doesn&apos;t have to conflict with that behavior.  We have the concept of &quot;state override&quot;/&quot;value override&quot; already in the spec to handle things like this.  For instance, if you have f&lt;b&gt;o&lt;/b&gt;o and the user backspaces over &quot;o&quot;, then the &lt;b&gt; is gone, but if they type without moving the cursor, a new &lt;b&gt; is created to wrap their newly-added text.  So I just have to make sure that if two tags get merged this way, we set state/value overrides so that newly-typed text will un-split the tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55602</commentid>
    <comment_count>3</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-22 20:18:04 +0000</bug_when>
    <thetext>Yes, that would make sense to me.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>