ashthornton / asscroll

Ash's Smooth Scroll 🍑
MIT License
947 stars 27 forks source link

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

Closed lm-esilab closed 2 years ago

lm-esilab commented 2 years ago

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 :

https://user-images.githubusercontent.com/91455302/162705191-9e2266ba-38bd-4d04-8060-4dccf3298cbc.mov

iamlinkus commented 2 years ago

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 commented 2 years ago

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.