Bug 23507
Summary: | pressing enter inside a list item doesn't create new list item | ||
---|---|---|---|
Product: | WebKit | Reporter: | Deepak Jindal <deepak.jindal> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ayg, eric, jindal, jparent, marcosalmeida, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Deepak Jindal
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
(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.)
Ryosuke Niwa
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.)
Ryosuke Niwa
Apparently, MSIE8 DOES create new list item. Perhaps they have changed the behavior since MSIE7 or that I didn't test well.
Marcos Almeida
This is still an issue and affects Google properties.
Aryeh Gregor
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