Summary: | execCommand('JustifyCenter') adds extra BR | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, enrica, jparent, ojan, rolandsteiner, tkent, tony | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2010-12-14 18:16:10 PST
Created attachment 76612 [details]
fixes the bug
Comment on attachment 76612 [details]
fixes the bug
Seems inelegant to me to add a <br> and then later remove it.
Thanks for the review! (In reply to comment #2) > (From update of attachment 76612 [details]) > Seems inelegant to me to add a <br> and then later remove it. It really is. I'm not happy about that either. But we do this all ever the place in editing whenever we move paragraphs because ReplaceSelectionCommand and others require a placeholder. We could avoid doing this if we had used moveParagraphWithClones instead. On a side note, we should really be using ApplyBlockElementCommand here because all we need to do is to wrap each paragraph with a div and ApplyBlockElementCommand does exactly that. However, when I tried to deploy ApplyBlockElementCommand while working on this bug, I encountered numerous crashes and failures and I had to give up. I'll come back to this issue later though. Comment on attachment 76612 [details] fixes the bug Clearing flags on attachment: 76612 Committed r74214: <http://trac.webkit.org/changeset/74214> All reviewed patches have been landed. Closing bug. |