[DNM] Add …-toolbar-open class after toolbarSetupDeferred resolved

Test for I5a35a5f.

Bug: T358657
Change-Id: I23094e9084b260c7ba9a6e47fd30bf40c3a0b904
This commit is contained in:
thiemowmde 2024-04-02 14:53:22 +02:00
parent b3f7410c80
commit 5a54315fc2

View file

@ -254,14 +254,14 @@ ve.init.mw.DesktopArticleTarget.prototype.setupToolbar = function ( surface ) {
ve.track( 'trace.setupToolbar.exit', { mode: mode } );
if ( !wasSetup ) {
toolbar.$element
.addClass( 've-init-mw-desktopArticleTarget-toolbar-open' );
if ( !toolbar.isFloating() ) {
toolbar.$element.css( 'height', '' );
}
this.toolbarSetupDeferred.resolve();
this.toolbarSetupDeferred.done( function () {
toolbar.$element.addClass( 've-init-mw-desktopArticleTarget-toolbar-open' );
var newSurface = target.getSurface();
// Check the surface wasn't torn down while the toolbar was animating
if ( newSurface ) {