Bug 12317
| Summary: | webkit-block-placeholder class on placeholders seems unnecessary | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Dan Wood <dwood> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | fuck |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 420+ | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
Dan Wood
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 "Hello" and hit the return key
Results: The contents of the editable DIV are:
Hello.<div><br class="webkit-block-placeholder"></div>
Expected:
There shouldn't be an internal webkit class. Also the empty divs surrounding a <br> are weird -- I would expect there to be something like just a <br> but not enclosed in a div.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dan Wood
Note also that the DIV does not self-close, it's not proper XHTML
Justin Garcia
If you want <br>s on carriage returns you could override insertNewline: and insertParagraphSeparator: and call insertLineBreak:, or you could use custom keybindings in your app.
I'm going to make this bug about the seemingly unnecessary -webkit-block-placeholder class on the br.
Please file a separate bug for the fact that the <br>s aren't self closing.
Mark Rowe (bdash)
<rdar://problem/5685601>
Justin Garcia
r30016