Skip to content

Commit

Permalink
fix: fix toolbox category selection (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko authored Aug 28, 2024
1 parent 3811d93 commit d3e1a1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scratch_continuous_toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ export class ScratchContinuousToolbox extends ContinuousToolbox {
}

forceRerender() {
const selectedCategoryName = this.selectedItem_?.getName();
super.refreshSelection();
let callback;
while ((callback = this.postRenderCallbacks.shift())) {
callback();
}
this.selectCategoryByName(selectedCategoryName);
}

runAfterRerender(callback) {
Expand Down

0 comments on commit d3e1a1b

Please # to comment.