Bug 12317 - webkit-block-placeholder class on placeholders seems unnecessary
Summary: webkit-block-placeholder class on placeholders seems unnecessary
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-01-18 11:56 PST by Dan Wood
Modified: 2008-02-05 13:56 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Wood 2007-01-18 11:56:00 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 "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.
Comment 1 Dan Wood 2007-01-18 12:24:59 PST
Note also that the DIV does not self-close, it's not proper XHTML
Comment 2 Justin Garcia 2007-03-06 22:38:53 PST
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.
Comment 3 Mark Rowe (bdash) 2008-01-12 19:02:18 PST
<rdar://problem/5685601>
Comment 4 Justin Garcia 2008-02-05 13:56:09 PST
r30016