Bug 20216 - execCommand RemoveFormat removes links
Summary: execCommand RemoveFormat removes links
Status: RESOLVED FIXED
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: GoogleBug, NeedsReduction
Depends on: 43017
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 14:51 PDT by Deepak Jindal
Modified: 2010-10-25 17:09 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deepak Jindal 2008-07-29 14:51:26 PDT
RemoveFormat shouldn't remove anchor tags.
Comment 1 Tony Chang 2010-03-04 22:38:45 PST
It looks like in WebKit, "removeformat" means remove all tags (lists, tables, anchors, everything).  In Firefox and IE, it means remove text formatting, but keep structural formatting.

There's no equivalent command in TextEdit, so I'm not sure what's supposed to happen.

Julie, should we try to mach Firefox and IE here?  There are plenty of test cases where the current behavior is expected (e.g., removing lists).

Here's a test case:
http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20id%3D%22e%22%20contenteditable%3E%3Cspan%20style%3D%22color%3Ared%22%3E%3Ca%20href%3D%22http%3A%2F%2Fwww.google.com%2F%22%3EHello%3C%2Fa%3E%20world%3C%2Fspan%3E%0A%3Cul%3E%0A%3Cli%3Eone%0A%3Cli%3Etwo%0A%3C%2Ful%3E%0A%3Cinput%3E%0A%3Ctextarea%3Ehi%3C%2Ftextarea%3E%0A%3Ctable%20border%3D1%3E%3Ctr%3E%3Ctd%3Efoo%3C%2Ftd%3E%3C%2Ftr%3E%3C%2Ftable%3E%0A%3C%2Fdiv%3E&ohh=1&ohj=1&jt=document.execCommand(%22removeformat%22%2C%20false%2C%20null)&ojh=0&ojj=0&ms=100&oth=0&otj=0&cex=1
Comment 3 Ryosuke Niwa 2010-10-25 17:09:38 PDT
This bug has been fixed since http://trac.webkit.org/changeset/70283.  Since there are already regression tests for this bug, I close this bug.