JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.1
[ckeditor.git] / _source / plugins / editingblock / plugin.js
index 8996dc2..7dbb92c 100644 (file)
@@ -95,21 +95,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        // Do that once only.\r
                                        event.removeListener();\r
 \r
-                                       // Grab editor focus if the editor container is focused. (#3104)\r
-                                       var focusGrabber = editor.container;\r
-\r
-                                       // Safari 3 can't handle tabindex in all elements, so we do\r
-                                       // a trick to make it move the focus to the editor on TAB.\r
-                                       if ( CKEDITOR.env.webkit && CKEDITOR.env.version < 528 )\r
-                                       {\r
-                                               var tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0;\r
-                                               focusGrabber = focusGrabber.append( CKEDITOR.dom.element.createFromHtml(\r
-                                                       '<input' +\r
-                                                               ' tabindex="' + tabIndex + '"' +\r
-                                                               ' style="position:absolute; left:-10000">' ) );\r
-                                       }\r
-\r
-                                       focusGrabber.on( 'focus', function()\r
+                                       // Redirect the focus into editor for webkit. (#5713)\r
+                                       CKEDITOR.env.webkit && editor.container.on( 'focus', function()\r
                                                {\r
                                                        editor.focus();\r
                                                });\r
@@ -123,7 +110,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                        setTimeout( function(){\r
                                                editor.fireOnce( 'instanceReady' );\r
                                                CKEDITOR.fire( 'instanceReady', null, editor );\r
-                                       } );\r
+                                       }, 0 );\r
                                });\r
                }\r
        });\r