Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Window jumps to top when using a form in Safari v15.4 #80

Closed
lm-esilab opened this issue Apr 11, 2022 · 2 comments
Closed

Window jumps to top when using a form in Safari v15.4 #80

lm-esilab opened this issue Apr 11, 2022 · 2 comments

Comments

@lm-esilab
Copy link

Hello, thank you for the nice library !

The only issue I have is with the last version of Safari (v15.4, it didn't appear in v15.2). When focusing or typing in an input, the window jumps to the top. It seems to happen because of Safari which forces the window to scroll so that the inputs stay into the view when a user interacts with them.

I hope that everything's clear, here is a video to explain a little better what happens :

bug-with-safari-and-asscroll.mov
@iamlinkus
Copy link

iamlinkus commented Apr 12, 2022

Would be awesome if you could share a codepen example of the problem. I've tried a few of my projects using ASScroll and I cannot reproduce the problem on my end (latest safari). Even focusing using TAB ASScroll scrolls the page smoothly so that the input is in the view (same on chrome).

Also, is there any code that executes on input focus on your project?

@lm-esilab
Copy link
Author

I finally solved the bug !
Thank you @iamlinkus for making me realize that the problem was actually coming from my project.

If someone has the same issue, adding overflow: hidden; to the asscroll-container element solved it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants