﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5950	getSelection IE7 & IE6 = is null or not an object	thinkap		"When i try to extract the selected text from the editor i receive the error ""getSelection is null or not an object"" only happens in ie6 & ie7. it works great in ie8, firefox, chrome & safari.


{{{


var editor_name = 'email_ckeditor';


var mySelection = CKEDITOR.instances[editor_name].getSelection();


if (CKEDITOR.env.ie) {
    mySelection.unlock(true);
    selectedText = mySelection.getNative().createRange().text;
} else {
    selectedText = mySelection.getNative();
}

alert( selectedText );
	
}}}

also tried without luck

{{{

var editor_name = 'email_ckeditor';


if (CKEDITOR.env.ie) {

selection = CKEDITOR.instances[editor_name].getSelection().document.$.selection.createRange().text;
			
} else {

selection  = CKEDITOR.instances[editor_name].getSelection().getNative();
};

alert( selection );

}}}

"	Bug	closed	Normal		General	3.3.1	invalid		
