Skip to content

Conversation

@kineticjs
Copy link
Contributor

@kineticjs kineticjs commented Feb 9, 2026

Problem:
Items with overflow-priority="AlwaysOverflow" would briefly appear in the
main toolbar before moving to the overflow popover. This occurred because
overflow distribution happened after rendering:

  1. First render placed all items in standardItems (itemsToOverflow was empty)
  2. After render, distributeItems() populated itemsToOverflow with AlwaysOverflow items
  3. This state change triggered re-render, causing visible flash as items moved

This affected both initial render and dynamically added AlwaysOverflow items.

Solution:
Added prePopulateAlwaysOverflowItems() method called in onBeforeRendering()
that adds any AlwaysOverflow items not already in itemsToOverflow. This ensures:

  • Initial render already places AlwaysOverflow items in overflow
  • Dynamically added AlwaysOverflow items are handled before their first render
  • Existing overflow calculation logic remains unchanged (items aren't duplicated)

Fixes: #12067

@kineticjs kineticjs marked this pull request as ready for review February 12, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Toolbar]: AlwaysOverflow toolbar children are visible before toolbar resizes

2 participants