Commit ecf557c Alexis Beingessner
committed
1 parent 41fd59b commit ecf557c Copy full SHA for ecf557c
File tree 3 files changed +42
-8
lines changed
3 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 1729
1729
var editorHeight
1730
1730
, newHeight
1731
1731
, minHeight
1732
- , maxHeight ;
1732
+ , maxHeight
1733
+ , el
1734
+ , style
1735
+ , _pxToInt ;
1733
1736
1734
1737
//autogrow in fullscreen in nonsensical
1735
1738
if ( ! this . is ( "fullscreen" ) ) {
1736
1739
if ( this . is ( "edit" ) ) {
1737
- editorHeight = this . getElement ( 'editor' ) . documentElement . scrollHeight ;
1740
+ el = this . getElement ( 'editor' ) ;
1738
1741
}
1739
1742
else {
1740
- editorHeight = this . getElement ( 'previewer' ) . documentElement . scrollHeight ;
1743
+ el = this . getElement ( 'previewer' ) ;
1744
+ }
1745
+
1746
+ if ( _isIE ( ) ) {
1747
+ _pxToInt = function ( val ) {
1748
+ return parseInt ( val . substring ( 0 , val . length - 2 ) , 10 ) ;
1749
+ }
1750
+ style = window . getComputedStyle ( el . documentElement , null ) ;
1751
+ editorHeight = el . body . scrollHeight + _pxToInt ( style . getPropertyValue ( "padding-top" ) ) + _pxToInt ( style . getPropertyValue ( "padding-bottom" ) ) +
1752
+ _pxToInt ( style . getPropertyValue ( "margin-top" ) ) + _pxToInt ( style . getPropertyValue ( "margin-bottom" ) ) + 28 ;
1753
+ }
1754
+ else {
1755
+ editorHeight = el . documentElement . scrollHeight ;
1741
1756
}
1742
1757
1743
1758
newHeight = editorHeight ;
You can’t perform that action at this time.
0 commit comments