angelomelonas / vue-scroll-snap

A super simple Vue component that allows fullscreen and horizontal scroll snapping.
MIT License
31 stars 10 forks source link

Layout change firefox #9

Open pkpowell opened 3 years ago

pkpowell commented 3 years ago

Firefox seems to lose the snapped element after a layout change (eg resize or orientation). This is visible in the demo if one selects the 2nd, 3rd... element and resizes the page. This doesn't happen with chrome, safari or edge. Anyone know of a fix?

angelomelonas commented 3 years ago

This is likely due to some browser-specific CSS that is missing. Unfortunately, I don't currently have time to look into it.

angelomelonas commented 3 years ago

@pkpowell I have been able to reproduce this on Firefox. The steps are as follows:

  1. Select te Vertical scroll option
  2. Scroll to the second or third element
  3. Resize the browser windows (make it smaller)

The bug is then clearly visible:

image

It looks like Firefox is using absolute positioning to determine the location of the element (instead of it being relative to the container).

As I mentioned above, I don't currently have time to investigate this further. Anyone willing to look into this further is more than welcome though 😄

OleksandrHrubyi commented 1 year ago

Hello. I have a problem, I wrapped everything in view snap. and when I click on the link of another page in the footer, the scroll remains in place, and I need the scroll to be on the top section. how to solve it?: