Bug 23507 - pressing enter inside a list item doesn't create new list item
Summary: pressing enter inside a list item doesn't create new list item
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-23 11:39 PST by Deepak Jindal
Modified: 2017-07-18 08:29 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Jindal 2009-01-23 11:39:53 PST
Take the following html in which the list item is inside a div:

<ul><li><div>foobar</div></li></ul>

Place your cursor between foo and bar and press enter. A new list item should be created.
Comment 1 Ryosuke Niwa 2009-06-19 01:20:17 PDT
(In reply to comment #0)
> Take the following html in which the list item is inside a div:
> 
> <ul><li><div>foobar</div></li></ul>
> 
> Place your cursor between foo and bar and press enter. A new list item should
> be created.
> 

I tried three different browsers (Firefox 3, MSIE 7, and Safari).  Only Firefox inserts new list.  Because div is a block element, I don't think inserting a new line within a div shouldn't be splitting the div.  On the other hand, when I'm at the end of "foobar", I feel like I should be able to start new item by pressing enter (MSIE and WebKit doesn't let you create new list item at all.)
Comment 2 Ryosuke Niwa 2009-06-19 01:23:22 PDT
Sorry, I submitted the comment prematurely with lots of typo.  Here's a slightly better version of it:

I tried three different browsers (Firefox 3, MSIE 7, and Safari), and only Firefox inserted a new list item.  Because div is a block element, I don't think inserting a new line within a div should be splitting the div.  On the other hand, when I'm at the end of "foobar", I feel like I should be able to insert a new list item by pressing enter (MSIE and WebKit don't let you create new list item at all.)
Comment 3 Ryosuke Niwa 2009-08-03 16:01:23 PDT
Apparently, MSIE8 DOES create new list item.  Perhaps they have changed the behavior since MSIE7 or that I didn't test well.
Comment 4 Marcos Almeida 2009-09-29 13:22:47 PDT
This is still an issue and affects Google properties.
Comment 5 Aryeh Gregor 2011-08-19 12:31:38 PDT
Currently my spec agrees with WebKit, but I agree with comment #0 that splitting the list item makes more sense.  I've filed a spec bug:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13841