Skip to content

Add resize observer to refresh when visibilty changes - #277

Open
OMGPizzaGuy wants to merge 1 commit into
NickPiscitelli:masterfrom
OMGPizzaGuy:fix-276
Open

Add resize observer to refresh when visibilty changes#277
OMGPizzaGuy wants to merge 1 commit into
NickPiscitelli:masterfrom
OMGPizzaGuy:fix-276

Conversation

@OMGPizzaGuy

@OMGPizzaGuy OMGPizzaGuy commented May 7, 2026

Copy link
Copy Markdown

In cases were the gilder starts hidden and is shown by user action, the dots will not recalculate and arrows will not function if slidesToShow is 'auto' as that value will calculate to zero.
This might happen if the glider is placed inside a drawer or accordion component.

If the glider is set to be responsive, a ResizeObserver can be used to detect show / hide, reset the breakpoint, and refresh the glider.

Fix for #276
This is low priority as code can be added outside glider.js to workaround the issue

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.

1 participant