Skip to content

Commit

Permalink
Avoid conflicting call of _onResize() (#16335)
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed May 17, 2024
1 parent e34aad0 commit 44b82c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui-components/src/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ export class ReactiveToolbar extends Toolbar<Widget> {
const toolbarPadding = 2 + 5;
let width = opener.isHidden ? toolbarPadding : toolbarPadding + openerWidth;

this._getWidgetsToRemove(width, toolbarWidth, openerWidth)
.then(values => {
return this._getWidgetsToRemove(width, toolbarWidth, openerWidth)
.then(async values => {
let { width, widgetsToRemove } = values;
while (widgetsToRemove.length > 0) {
// Insert the widget at the right position in the opener popup, relatively
Expand Down Expand Up @@ -626,7 +626,7 @@ export class ReactiveToolbar extends Toolbar<Widget> {
opener.hide();
}
if (callTwice) {
void this._onResize();
await this._onResize();
}
})
.catch(msg => {
Expand Down

0 comments on commit 44b82c8

Please sign in to comment.