Bug 29806

Summary: FormatBlock command removes formatting and comments
Product: WebKit Reporter: Dan POPA <dpopa>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: ayg, enrica, jparent, morrita, ojan, rniwa, tkent, tony
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
removeformat editor command removes formatting and comments. none

Dan POPA
Reported 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>
Attachments
removeformat editor command removes formatting and comments. (915 bytes, text/html)
2009-09-28 06:47 PDT, Dan POPA
no flags
Dan POPA
Comment 1 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>
Aryeh Gregor
Comment 2 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.
Ryosuke Niwa
Comment 3 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.
Note You need to log in before you can comment on or make changes to this bug.