- onResize = function()\r
- {\r
- // Holder rectange size is stretched by textarea,\r
- // so hide it just for a moment.\r
- textarea.hide();\r
- textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' );\r
- // When we have proper holder size, show textarea again.\r
- textarea.show();\r
- };\r
- editor.on( 'resize', onResize );\r
- styles.height = holderElement.$.clientHeight + 'px';\r
- }\r
- }\r
- else\r
- {\r
- // By some yet unknown reason, we must stop the\r
- // mousedown propagation for the textarea,\r
- // otherwise it's not possible to place the caret\r
- // inside of it (non IE).\r
- textarea.on( 'mousedown', function( evt )\r
- {\r
- evt = evt.data.$;\r
- if ( evt.stopPropagation )\r
- evt.stopPropagation();\r
- } );\r
+ // Holder rectange size is stretched by textarea,\r
+ // so hide it just for a moment.\r
+ textarea.hide();\r
+ textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' );\r
+ textarea.setStyle( 'width', holderElement.$.clientWidth + 'px' );\r
+ // When we have proper holder size, show textarea again.\r
+ textarea.show();\r
+ };\r
+\r
+ editor.on( 'resize', onResize );\r
+ win.on( 'resize', onResize );\r
+ setTimeout( onResize, 0 );\r