<?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>223689</bug_id>
          
          <creation_ts>2021-03-24 06:51:22 -0700</creation_ts>
          <short_desc>[GTK] After multiline paste into LI cannot add new LI using Enter</short_desc>
          <delta_ts>2021-03-24 07:26:44 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Milan Crha">mcrha</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>nekohayo</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1743292</commentid>
    <comment_count>0</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2021-03-24 06:51:22 -0700</bug_when>
    <thetext>Usual editing of an OL/UL adds a new LI whe the Enter key is pressed, as expected. When there&apos;s pasted multiline (multiparagraph) text into the LI, the enter will add the paragraph, instead of the LI. This is with WebKitGTK 2.30.5.

Steps:
a) create /tmp/a.html with this content:

&lt;html&gt;&lt;body&gt;
&lt;div&gt;text before&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;l1&lt;/li&gt;
&lt;li&gt;&lt;div&gt;l2 with div&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;l3&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;div1&lt;/div&gt;
&lt;div&gt;div2&lt;/div&gt;
&lt;div&gt;div3&lt;/div&gt;
&lt;/body&gt;&lt;/html&gt;

b) call: MiniBrowser --editor-mode /tmp/a.html
c) pressing Enter in &quot;l1&quot; adds a new LI - as expected
d) pressing Enter in &quot;l2 with div&quot; adds a new DIV - not expected, it may split the text and add a new LI

You may claim it&apos;s a crafted code, but it can happen easily:

e) select &quot;div1 div2&quot; text
f) Ctrl+C to copy it
g) go to the end of the &quot;l3&quot; line end press Enter to create a new bullet point
h) paste (Shift+Ins)

The &quot;div1 div2&quot; is as two lines in a single bullet. Pressing Enter anywhere in this bullet will not create a new LI, it creates a new DIV inside that LI.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>