Stop the inline image toolbar re-rendering on every scroll frame

Performancekamo-internal
Shipped
September 3, 2026 at 4:34 AM UTC
Author
Kamo
Commit
79a0fcb

measure() runs on each scroll and resize event and built a fresh state object every time, so the toolbar re-rendered whether or not anything about the image had changed. The box already had an equality guard; the image state now has one too, which is what holds a scroll to a single render. Also drops the effect that cleared the selection when the composer was disabled. It never had anything to do: the overlay already renders nothing while disabled, and measure() releases a selection whose element has left the DOM, which is what a sent-and-reset draft does to it.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing