Bug 131846
| Summary: | Text content stripped from anchor tag on insert | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Julie Parent <jparent> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | rniwa |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://plexode.com/eval3/#s=aekVQXANJVQMbAx14Hz1PBENCRSpFXJgBeRsBT1BPRhyYXpgfHRCWmJgdcgFKRR4IREYIAUSnVUZPVSZFSlVCQ01GHypPVEZTVQFJ0Uavch8DDQNLkZNhREUBHgFwD24JurwKqk/iD0dQRFZUCe2YEBABztDSAJCAJNJRPJgNAJYY5JALBLLTghUW5Gg8JKsLTbjW6Yc5GLJGIgkKBOJxCJ5FdUQaJVFJVJxNBEHI5CJrQg49SkBW65jCeBAfHDVKZGALGcYqAJIKAgV5CS4DfBPfQBGpTLS2acVhclKEWaK2IsHJpQKEGXzAYUPKkMoJGAUbB8dj8hkclk4IlLSlkumABmU0iYBm4dnK4BFcoM9D4jKzTo5II0PZ8qIxFAVMp1QfL7IjVIhMtdDX7DtBUTBhjDkczodU8IoIzJPJRHAIJAUYB+cJRNIovKBFIxUB7LJ5IiwKAKgJ4BgDLaTqE5C3UH1BJIVqUy+JO6ItCJ+vdxebYDKBLJKSAYR8XkJfn9LcXZZ9oDLwAA== | ||
Julie Parent
What steps will reproduce the problem?
1. On a page, have css with display:none, with a id selector, for example; #badId{ display: none; }
2. Insert an anchor tag, with text contents, and the matching id into a contentEditable region -for example document.execCommand('insertHtml', false, "<a id='badId'>Where did I go?</a>");
Result: An anchor tag is inserted, but it has no text contents.
Expected Output: The "Where did I go?" text is inserted.
Notes:
- this happens with class selectors too, not just ids.
- this happens via insertHtml, paste, or drop too
See it in action at the included link
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |