JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1
[ckeditor.git] / _source / plugins / forms / dialogs / select.js
index c8b43d3..8ec81c4 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 CKEDITOR.dialog.add( 'select', function( editor )\r
@@ -160,7 +160,18 @@ CKEDITOR.dialog.add( 'select', function( editor )
                        this.commitContent( element );\r
 \r
                        if ( isInsertMode )\r
-                               editor.insertElement( element );\r
+                       {\r
+                               editor.insertElement(element);\r
+                               if( CKEDITOR.env.ie )\r
+                               {\r
+                                       var sel = editor.getSelection(),\r
+                                               bms = sel.createBookmarks();\r
+                                       setTimeout(function ()\r
+                                       {\r
+                                               sel.selectBookmarks( bms );\r
+                                       }, 0 );\r
+                               }\r
+                       }\r
                },\r
                contents : [\r
                        {\r