Best way to refresh continuous toolbox in latest Blockly?

52 views
Skip to first unread message

Sardorbek Omonkulov

unread,
Feb 20, 2026, 2:29:33 PMFeb 20
to Blockly

Hi Blockly team! We’re migrating from an older Blockly to the latest version. We use a continuous (scratch-style) toolbox rather than displaying a single category at time. We are using the continuous-toolbox plugin. 

When we switch languages, we need the toolbox blocks to update as well. We found APIs that refresh the selected category (e.g. refreshToolboxSelection), but in a continuous toolbox users can scroll without clicking a category button, so that doesn’t reliably refresh what’s on screen. 

Our current workaround is rebuilding the whole toolbox but that resets scroll position and dropdowns of all the blocks in the toolbox.

Is there a recommended approach to refresh the entire continuous toolbox contents without rebuilding or a best-practice way to rebuild while preserving scroll/UI state?

Thanks in advance!

Aaron Dodson

unread,
Feb 23, 2026, 12:54:10 PMFeb 23
to Blockly
Hi,

I wouldn't exactly say this is recommended, but this is how Scratch (updated to work with latest Blockly) does it. The basic idea is to get the coordinates of the active category, then how far into that category you're scrolled, and restore that scroll position after the toolbox contents are rebuilt. Hopefully that helps some!

- Aaron

Reply all
Reply to author
Forward
0 new messages