From 180476bbf8504842d455befea28af96f936d38e3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 30 Nov 2012 04:54:09 +0000 Subject: [PATCH] Correctly insert images at caret position in IE8/7. Props lessbloat fixes #22638 git-svn-id: http://core.svn.wordpress.org/trunk@22943 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/media-editor.js b/wp-includes/js/media-editor.js index 7e9460ae46..3d0daae7c0 100644 --- a/wp-includes/js/media-editor.js +++ b/wp-includes/js/media-editor.js @@ -531,8 +531,10 @@ } // Save a bookmark of the caret position, needed for IE - if ( tinymce.isIE && editor && ! editor.isHidden() ) + if ( tinymce.isIE && editor && ! editor.isHidden() ) { + editor.focus(); editor.windowManager.insertimagebookmark = editor.selection.getBookmark(); + } } // Last but not least, fall back to the empty string.