- 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
+ // 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