Bug 45545
Summary: | Safari turns return in designMode into break inclosed in div | ||
---|---|---|---|
Product: | WebKit | Reporter: | lvschie <lvschie> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | ayg, barraclough, enrica, lvschie, max.hong.shen, rniwa, sullivan |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac (Intel) | ||
OS: | OS X 10.6 |
lvschie
When entering designMode, Safari turns an enter into a < div > < br > < /div > while it should just create a < br > or a paragraph < p > < / p >. Other browsers like FireFox do handle this in the right way.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Gavin Barraclough
Not sure what component this should be in, but doesn't look like a JSC bug!
Ryosuke Niwa
I'm not sure if we can fix this bug because we do need a placeholder br for empty divs.
I'm inclined to say we won't fix this bug.
Aryeh Gregor
The extra <br> is needed initially. It should be removed as soon as there's other content to stop the div/p from collapsing. Firefox and Opera both also use <br> for this purpose; IE uses (but it's somewhat magical and is prone to disappear depending on how you look at it).
By default WebKit should be emitting <p> per spec (and per IE/Opera), not <div>, but that's a separate issue.
Firefox is wrong for emitting <br>. This was discussed extensively and the conclusion was to go with IE/Opera's behavior: <http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031577.html>. I'm working on fixing Firefox to match the spec better: <https://bugzilla.mozilla.org/show_bug.cgi?id=748303>.
Ryosuke Niwa
Thanks for the confirmation, Aryeh.
We won't fix this bug because <br> inside the div is needed.