Media in Internet Explorer: Properly insert attachments into the editor at the location of the cursor. props azaozz. fixes #22446.

git-svn-id: https://develop.svn.wordpress.org/trunk@22877 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-27 19:24:56 +00:00
parent 3b941ca1b8
commit bccdaa137d
1 changed files with 4 additions and 0 deletions

View File

@ -501,6 +501,10 @@
// Last but not least, fall back to the empty string.
id = id || '';
// Save a bookmark of the caret position, needed for IE
if ( typeof tinymce !== 'undefined' && tinymce.activeEditor && tinymce.isIE && ! tinymce.activeEditor.isHidden() )
tinymce.activeEditor.windowManager.insertimagebookmark = tinymce.activeEditor.selection.getBookmark();
workflow = wp.media.editor.get( id );
// If the workflow exists, open it.