- // Create an invisible element to grab focus.\r
- if ( CKEDITOR.env.gecko || CKEDITOR.env.ie || CKEDITOR.env.opera )\r
- {\r
- var focusGrabber;\r
- editor.on( 'uiReady', function()\r
- {\r
- focusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml(\r
- // Use 'span' instead of anything else to fly under the screen-reader radar. (#5049)\r
- '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' ) );\r
-\r
- focusGrabber.on( 'focus', function()\r
- {\r
- editor.focus();\r
- } );\r
-\r
- editor.focusGrabber = focusGrabber;\r
- } );\r
- editor.on( 'destroy', function()\r
- {\r
- CKEDITOR.tools.removeFunction( contentDomReadyHandler );\r
- focusGrabber.clearCustomData();\r
- delete editor.focusGrabber;\r
- } );\r
- }\r
-\r