youtube iframe embed is replaced with placeholder div in ContentEditable

Originator:andrew.herron
Number:rdar://21197114 Date Originated:02-Jun-2015 03:52 PM
Status:Open Resolved:
Product:Safari Product Version:8.0.7 (10600.7.7)
Classification:UI/Usability Reproducible:Always
 
(attachment can't be uploaded here, but it should be pretty obvious)

Summary:
We have found a bug when inserting a youtube embed iframe into a ContentEditable div. Safari 8.0.7 replaces the iframe with a youtube placeholder. This does not happen on 8.0.6.

This both allows cursor navigation into the embed structure, and breaks our editor when the element we insert via appendChild() does not actually appear in the DOM.

Steps to Reproduce:
1. Load contenteditable-youtube.html
2. Note the iframe inside the div has been turned into a youtube placeholder
3. Click "set as complete content"
4. Note the replacement iframe inside the div has been turned into a youtube placeholder
5. Click "insert content"
6. Open the developer -> error console
7. Note that the element we were inserting is an iframe (first log message), and after insertion the iframe's parent is still null (second message)
8. Note the new iframe inside the div has been turned into a youtube placeholder

Expected Results:
An iframe is inserted

Actual Results:
A youtube placeholder is inserted

Version:
Safari 8.0.7 (10600.7.7), OS X 10.10.4 (14E26a)

Notes:
Replacing an iframe with a youtube placeholder, if you do it, should not happen inside a ContentEditable div.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!