Bug 131846 - Text content stripped from anchor tag on insert
Summary: Text content stripped from anchor tag on insert
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://plexode.com/eval3/#s=aekVQXANJ...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-18 10:26 PDT by Julie Parent
Modified: 2014-04-18 12:33 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julie Parent 2014-04-18 10:26:47 PDT
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