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