ve.collab: Resize toolbar properly after adding authorList

Change-Id: I18ebe5a230b775d048d5c5792b455831b9b59968
这个提交包含在:
Ed Sanders 2024-03-05 14:30:54 +00:00 提交者 Divec
父节点 501dafff3f
当前提交 cf7feefc01
共有 2 个文件被更改,包括 8 次插入1 次删除

查看文件

@ -113,10 +113,12 @@ ve.collab.initPeerClient = function ( serverId, isMain ) {
);
return;
}
ve.init.target.getToolbar().setup(
var toolbar = ve.init.target.getToolbar();
toolbar.setup(
ve.init.target.constructor.static.toolbarGroups,
ve.init.target.surface
);
toolbar.onWindowResize();
if ( !isMain ) {
// eslint-disable-next-line no-jquery/no-global-selector
$( '.ve-ui-toolbar-saveButton' ).css( 'text-decoration', 'line-through' );

查看文件

@ -271,6 +271,11 @@ ve.ui.Toolbar.prototype.detach = function () {
this.getSurface().getModel().disconnect( this );
this.surface = null;
}
// Reset narrow state/cache as when we setup again it
// may be with a different tool list.
// TODO: Create upstream detach/teardown
this.setNarrow( false );
this.narrowThreshold = null;
};
/**