Skip to content

Conversation

@kineticjs
Copy link
Contributor

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

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

Solution:
Pre-populate AlwaysOverflow items into itemsToOverflow in onBeforeRendering()
before the first render. Added conditional check that runs only when
itemsToOverflow is empty and items exist, calling distributeItemsThatAlwaysOverflow()
early. This ensures the first render already places items in correct positions,
eliminating the flash while maintaining compatibility with existing overflow
calculation logic.

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.

2 participants