﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
16780	selectElement and/or extractSelectedHtml work differently in Chrome and Safari	azotova		"== Steps to reproduce ==

1. I have the following html:
{{{
 <p>Some text...</p>
 <question>
   <answer>
      More text ...
   </answer>
 </question>
}}}

I am trying to replace the <question> element with another html string.

2. My code:

{{{
editor.getSelection().selectElement(element);
// here element is an instance of CKEDITOR.dom.element.
// Its nodeName property is 'QUESTION' in all browsers

editor.extractSelectedHtml();
editor.insertHtml(myString);
}}}

3. This works fine in Chrome and Firefox but doesn't work in Safari.

In Safari I get the following error when running extractSelectedHtml: `TypeError: undefined is not an object (evaluating 'a.startContainer.getDtd()')`. The inner html of the <question> element gets deleted, but the <question> tag itself stays.

I tried to check what editor.getSelectedHtml method returns in Chrome and Safari. In Chrome it returns CKEditor.dom.documentFragment with question as firstChild, and in Safari it returns  CKEditor.dom.documentFragment with answer (inner node) as firstChild.

== Expected result ==

I would expect my code snippet to produce the same result in all browsers.

Is this working as intended? Is there any workaround for this issue in Safari?"	Bug	pending	Normal		General				
