mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Toolbars: Replace $.height with clientHeight/offsetHeight
Bug: T185599 Change-Id: I43fbce8f221553e9ae03f8385f39a19de01e8eb7
This commit is contained in:
parent
97b04fbea5
commit
154f49e964
|
@ -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' )
|
||||
|
|
Loading…
Reference in a new issue