Bug 29806 - FormatBlock command removes formatting and comments
Summary: FormatBlock command removes formatting and comments
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2009-09-28 06:47 PDT by Dan POPA
Modified: 2011-08-19 13:29 PDT (History)
8 users (show)

See Also:


Attachments
removeformat editor command removes formatting and comments. (915 bytes, text/html)
2009-09-28 06:47 PDT, Dan POPA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan POPA 2009-09-28 06:47:51 PDT
Created attachment 40232 [details]
removeformat editor command removes formatting and comments.

removeformat editor command removes formatting and comments.

Check attachment for reproduction.

Have the following HTML inside a contenteditable element:
       Some <span style="font-weight: bold">bold text with a <!-- comment 1 -->comment </span> and some text after

After execCommand('formatblock', false, 'h1') the result is:
      <h1>Some bold text with a comment and some text after</h1>
Comment 1 Dan POPA 2009-09-28 07:00:37 PDT
Expected results:

<h1>Some <span style="font-weight: bold;">bold text with a <!-- comment 1 -->comment </span> and some text after</h1>
Comment 2 Aryeh Gregor 2011-08-19 13:13:01 PDT
Cannot reproduce in Chrome 15.0.849.0 dev.  The test-case behaves as expected, preserving all the markup inside.
Comment 3 Ryosuke Niwa 2011-08-19 13:29:24 PDT
(In reply to comment #2)
> Cannot reproduce in Chrome 15.0.849.0 dev.  The test-case behaves as expected, preserving all the markup inside.

Oh yes, I must have fixed this last year.