vue-scroll-snap icon indicating copy to clipboard operation
vue-scroll-snap copied to clipboard

Layout change firefox

Open pkpowell opened this issue 3 years ago • 3 comments

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?

pkpowell avatar Apr 23 '21 16:04 pkpowell

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

angelomelonas avatar May 12 '21 20:05 angelomelonas

@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 😄

angelomelonas avatar May 12 '21 20:05 angelomelonas

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?:

OleksandrHrubyi avatar Sep 01 '23 06:09 OleksandrHrubyi