Toolbars: Replace $.height with clientHeight/offsetHeight

Bug: T185599
Change-Id: I43fbce8f221553e9ae03f8385f39a19de01e8eb7
This commit is contained in:
Ed Sanders 2018-01-23 12:32:16 -08:00
parent 97b04fbea5
commit 154f49e964

View file

@ -256,7 +256,8 @@ ve.init.mw.DesktopArticleTarget.prototype.setupToolbar = function ( surface ) {
} else {
setTimeout( function () {
toolbar.$element
.css( 'height', toolbar.$bar.outerHeight() )
// Avoid $bar[ 0 ].offsetHeight as this returns null in IE9 when $bar is position:fixed
.css( 'height', toolbar.$bar[ 0 ].clientHeight )
.addClass( 've-init-mw-desktopArticleTarget-toolbar-open' );
setTimeout( function () {
// Clear to allow growth during use and when resizing window
@ -1151,7 +1152,8 @@ ve.init.mw.DesktopArticleTarget.prototype.teardownToolbar = function () {
return deferred.resolve().promise();
}
this.toolbar.$element.css( 'height', this.toolbar.$bar.outerHeight() );
// Avoid $bar[ 0 ].offsetHeight as this returns null in IE9 when $bar is position:fixed
this.toolbar.$element.css( 'height', this.toolbar.$bar[ 0 ].clientHeight );
setTimeout( function () {
target.toolbar.$element
.css( 'height', '0' )