Skip to content

Dots nav doesn't display on resize if the page is loaded first on viewport where slider is disabled #375

Closed
@marko-hologram

Description

Issue description:
Navigation dots are not appearing after you resize the window if the slider was initialized on a viewport where slider is disabled in the config. For example if you set that the slider is disabled on viewport >768px, if you load the page on a viewport larger than that and then resize the browser to <768px the slider will initialize, but navigation dots won't appear.

Reloading the page on viewport <768px shows navigation dots and resizing the viewport to >768px and then back to <768px works as expected.

I've included a link to jsfiddle where it is demonstrated. Try to run the fiddle with result window set to >768px, then resize it to <768px and dots won't show. Now run it again with result window <768px, then resize it to >768px and back to <768px and it will work as expected.

Tested only on Windows for now, can test on MacOS in about 12 hours from now if it's needed.

I know browser resizing in session isn't that common, but considering everything else inits properly I consider this a bug.

Demo link/slider setting: https://jsfiddle.net/n429tape/

Tiny-slider version: 2.9.1
Browser name && version: Chrome Version 71.0.3578.98 && Version 72.0.3626.81 || Firefox 64 && 65 || Microsoft Edge 44.17763.1.0 (Microsoft EdgeHTML 18.17763)
OS name && version: Windows 10 (v. 1809)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions