<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>128970</bug_id>
          
          <creation_ts>2014-02-18 06:31:42 -0800</creation_ts>
          <short_desc>Dragging nested spans inside contenteditable area results in destroying the parent span elements</short_desc>
          <delta_ts>2014-02-18 06:31:42 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</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>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hristo Chakarov">mail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>981908</commentid>
    <comment_count>0</comment_count>
    <who name="Hristo Chakarov">mail</who>
    <bug_when>2014-02-18 06:31:42 -0800</bug_when>
    <thetext>If I have nested span elements inside a contenteditable element, e.g.

&lt;div contenteditable=&quot;true&quot;&gt;
   &lt;span&gt;&lt;span&gt;&lt;span&gt;drag me&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;

and I select the root &lt;span&gt; element and drag the selection around the contenteditable &lt;div&gt;, when I drop the selection only the most nested &lt;span&gt; element is preserved. Others get destroyed.

Reproduced in Chrome and Safari (both latest): http://jsfiddle.net/ickata/s2Vz7/1/

In Chrome, if I replace &lt;span&gt; with &lt;b&gt; it works perfectly: http://jsfiddle.net/ickata/s2Vz7/2/ unless I add font-weight: normal to the &lt;b&gt; elements: http://jsfiddle.net/ickata/s2Vz7/3/

Same situation with &lt;i&gt; element: http://jsfiddle.net/ickata/s2Vz7/4/

In Safari both don&apos;t work properly - using &lt;b&gt; will work if I remove the display: inline-block property: http://jsfiddle.net/s2Vz7/5/

Video: http://ge.tt/100kPOK1/v/0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>