<?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>110682</bug_id>
          
          <creation_ts>2013-02-22 22:02:41 -0800</creation_ts>
          <short_desc>Deletion of selection in contenteditable node results in incorrect DOM ordering</short_desc>
          <delta_ts>2022-08-30 16:00:17 -0700</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=244559</see_also>
          <bug_file_loc>http://persistent.info/webkit/test-cases/selection-deletion.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mihai Parparita">mihaip</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>840305</commentid>
    <comment_count>0</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2013-02-22 22:02:41 -0800</bug_when>
    <thetext>Test case: http://persistent.info/webkit/test-cases/selection-deletion.html

1. Press the &quot;Select &apos;1. One&apos;&quot; button (or select the text &quot;1. One&quot; without the trailing newline)
2. Press the &quot;execCommand(&apos;delete&apos;)&quot; button (or press the delete key)

Expected result:

The &quot;1. One&quot; text is gone, but the contenteditable is otherwise unaffected, i.e.:
&lt;empty line&gt;
2. Two
3. Three

Actual result:

The latter two lines are combined into one, and the order is reversed:
&lt;empty line&gt;
3. Three2. Two

There appear to be several contributing factors in the test case:
- The lines all have &quot;position: relative&quot;
- There&apos;s a contenteditable=false &quot;toolbar&quot; div before before the first line
- There can&apos;t be any intervening whitespace in the DOM between the first two lines (see the lack of newline in the test case)

Bug 108987 may be related (in that it also involve contenteditable=&quot;false&quot; elements)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>840469</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-23 15:16:04 -0800</bug_when>
    <thetext>Not a regression from Safari 6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894971</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-30 16:00:17 -0700</bug_when>
    <thetext>I am not able to reproduce this bug in Safari Technology Preview 152 and it does not misalign list item as mentioned in &quot;Actual Result&quot; and it matches with other browsers (Chrome Canary 107 and Firefox Nightly 107). Here is DOM View post steps for all browsers:

 &lt;div id=&apos;editable&apos; contenteditable=&apos;true&apos;&gt;
  &apos;&amp;#10;&apos;
  &lt;div class=&apos;toolbar&apos;&gt;
    &apos;Toolbar&apos;
  &lt;/div&gt;
  &apos;&amp;#10;&apos;
  &lt;div class=&apos;section&apos; id=&apos;one&apos;&gt;
    &lt;br/&gt;
  &lt;/div&gt;
  &lt;div class=&apos;section&apos;&gt;
    &apos;2. Two&apos;
  &lt;/div&gt;
  &apos;&amp;#10;&apos;
  &lt;div class=&apos;section&apos;&gt;
    &apos;3. Three&apos;
  &lt;/div&gt;
  &apos;&amp;#10;&apos;
&lt;/div&gt;

I am going to mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot;, since original bug is not reproducible and all browsers match. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>