<?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>42850</bug_id>
          
          <creation_ts>2010-07-22 14:28:55 -0700</creation_ts>
          <short_desc>Copy-paste inside list inside bold tag is incorrect</short_desc>
          <delta_ts>2023-02-06 15:39:17 -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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>34564</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Julie Parent">jparent</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>enrica</cc>
    
    <cc>karlcow</cc>
    
    <cc>rniwa</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>254987</commentid>
    <comment_count>0</comment_count>
      <attachid>62340</attachid>
    <who name="Julie Parent">jparent</who>
    <bug_when>2010-07-22 14:28:55 -0700</bug_when>
    <thetext>Created attachment 62340
Test case

Repro steps:
1. Start with two lists, wrapped by a bold tag (or use attached test case):
&lt;div contentEditable&gt;&lt;b&gt;
&lt;ul&gt;
&lt;li&gt;level0&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;level1&lt;/li&gt;&lt;li&gt;copy me&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;level0&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;level1&lt;/li&gt;&lt;li&gt;paste here&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;/b&gt;&lt;/div&gt;
2. Select &quot;copy&quot; and copy.
3. Put cursor after &quot;here&quot; and paste.

Result:
&quot;copy&quot; is inside a new list, the HTML for the last LI is:
&lt;li&gt;paste here&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;b&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;copy&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;

Expected Result:
&quot;copy&quot; is after &quot;here&quot;, aka, the HTML for last LI is: &lt;li&gt;paste herecopy&lt;/li&gt;

Notes:
* May be related to https://bugs.webkit.org/show_bug.cgi?id=42849
* Also happens with &lt;i&gt; or &lt;u&gt; in place of &lt;b&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1916033</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-12-01 12:44:35 -0800</bug_when>
    <thetext>I am having different result compared to expected here:

*** Chrome Canary 110 &amp; Safari 16.1 ***

Paste here copy &lt;---------- Note - Webkit &amp; Blink are adding &quot;space&quot; automatically while selection while copying was showing no space being selected.

*** Firefox Nightly 109 ***

Paste herecopy &lt;----------- no space between here and copy as in expected result.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>62340</attachid>
            <date>2010-07-22 14:28:55 -0700</date>
            <delta_ts>2010-07-22 14:28:55 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>brokenpaste.html</filename>
            <type>text/html</type>
            <size>183</size>
            <attacher name="Julie Parent">jparent</attacher>
            
              <data encoding="base64">PGRpdiBjb250ZW50RWRpdGFibGU+PGI+DQo8dWw+DQo8bGk+bGV2ZWwwPC9saT4NCjx1bD48bGk+
bGV2ZWwxPC9saT48bGk+Y29weSBtZTwvbGk+PC91bD4NCjwvdWw+DQo8dWw+DQo8bGk+bGV2ZWww
PC9saT4NCjx1bD48bGk+bGV2ZWwxPC9saT48bGk+cGFzdGUgaGVyZTwvbGk+PC91bD4NCjwvdWw+
DQo8L2I+PC9kaXY+
</data>

          </attachment>
      

    </bug>

</bugzilla>