WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
12315
Clearing out editable div leaves a a <br> tag inside
https://bugs.webkit.org/show_bug.cgi?id=12315
Summary
Clearing out editable div leaves a a <br> tag inside
Dan Wood
Reported
2007-01-18 11:22:50 PST
To reproduce: 0. Launch Blot_editableDiv_showSource, my modified version of "Blot" available from <
http://dan.karelia.com/webkit/Blot_editableDiv_showSource.zip
> with DYLD_FRAMEWORK_PATH pointing to TOT. (I'm using
r18941
) 1. Click in the top panel 2. Type in a few letters of text 3. Backspace until they are all gone Results: In the source (created by dumping innerHTML of the document) leaves a <br> tag in the div. Expected: The div should be empty, as it was before we started editing.
Attachments
Add attachment
proposed patch, testcase, etc.
Dan Wood
Comment 1
2007-01-18 12:25:20 PST
The above test was done with just a really simple html page, e.g. <html><body> ... </body></html>. I noticed that if you use a XHTML strict DTD, then the markup is even worse! <div><br class="webkit-block-placeholder"></div> The contents of the div shoudl be empty, and yet instead we have this extra div tag and the BR with an internal class. (Plus note that the tag doesn't self-close.)
Matt Lilek
Comment 2
2007-01-18 13:23:46 PST
Related to
bug 12153
?
Dan Wood
Comment 3
2007-01-18 13:33:51 PST
Yes, it might be related --but this is a more general case, with an easy-to-confirm test.
Justin Garcia
Comment 4
2007-03-06 23:59:49 PST
>In the source (created by dumping innerHTML of the document) leaves a > <br> tag in the div.
Empty divs have no height. That's why we insert placeholders. The fact that we prop open ones that are empty in the source is a convenience.
> I noticed that if you use a XHTML strict DTD, then the markup is even worse! > > <div><br class="webkit-block-placeholder"></div> > > The contents of the div shoudl be empty, and yet instead we have this extra > div tag
I can't reproduce this. Finally, the fact that the placeholders have a special class on them is covered in 12317. Given all this, I'm closing this bug. Re-open it if you can still reproduce the bug where an *extra* div is inserted when the contents of the editable root are removed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug