﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11552	CKEDITOR 4.3.2 IE11 Permission Denied	G		"So I am writing a plugin for ckeditor (@ mentions).

when you type some characters (example ""@John"") a drop down will appear of a list of Johns that the user can select . When the users selects the drop down they want, it needs to remove the the ""@John"" text and insert an element that was retrieved from the dropdown

'''The Code'''


{{{
//Set the cursor at the current book mark
    mentions.editor.getSelection().selectBookmarks(CKEDITOR_mentions.CurrentBookMarks);
    // create the text for the element to insert
    var html = '<span style=""background-color: #d8dfea;"" data-personid=""' + id + '"" data-type=""' + type + '"" href=""#"">' + name + '</span>&nbsp;&nbsp;';
    // Create the Element to insert
    var newElement = CKEDITOR.dom.element.createFromHtml(html, mentions.editor.document);
    //Insert the element
    mentions.editor.insertElement(newElement);
    //Get a new bookmark
    var tempBookMark = mentions.editor.getSelection().createBookmarks(true);
    //remove the text that the editor is replacing
    RemoveText(mentions.editor, mentions.char_input.join(''));
    // set the focus back to the saved book mark position
    mentions.editor.getSelection().selectBookmarks(tempBookMark);
    //focas on that position
    mentions.editor.focus();
}}}

Function that removes the text

{{{

function RemoveText(ed, idontwant) {
    var edata = ed.getData();
    var replaced_text = edata.replace(idontwant, """"); // you could also use a regex in the replace 
    ed.setData(replaced_text);
}
}}}

'''The issue'''

This works just fine on chrome however on IE11 after the text has been removed, when I try to access the mentions.editor.getSelection() I get ""permission denied"" error. I cannot set the bookmark and the focus is moved to the start of the ckeditor."	Bug	closed	Normal		General		invalid		
