ui5-webcomponents
ui5-webcomponents copied to clipboard
fix(ui5-dynamic-page): prevent unwanted header toggle from scroll
Issue: The snapTitleByScroll function, triggered by scroll events, interfered with user-triggered actions such as onExpandClick and onToggleTitle. This caused the header to snap or close unexpectedly after being manually expanded.
Solution: An isToggled flag was introduced to temporarily prevent the snapTitleByScroll function from running right after a user-triggered toggle. This ensures that snapTitleByScroll doesn’t fire immediately after a manual action. Once the user toggle is complete, the flag is reset, allowing normal scroll-based snapping to resume without conflict.
Fixes: #9961