grzegorz-aleksander-klementowski / grzegorz-aleksander.klementowski.pl

My personal website.
https://grzegorz-aleksander.klementowski.pl
1 stars 0 forks source link

Problem with scrolling on browsers with Chromium Engine. #1

Open grzegorz-aleksander-klementowski opened 3 months ago

grzegorz-aleksander-klementowski commented 3 months ago

I am encountering an issue where the scrollIntoView method with the behavior: 'smooth' option is not working as expected in Chrome, Chromium and Edge. The same code works perfectly fine in Firefox. On desktop and mobile. So it looks like it works diffrently on Chromium Engine. When I click the button to trigger the scroll action, nothing happens in Chrome, while in Firefox, the page scrolls smoothly to the target element. I suspect there might be an issue with the way the event triggers or possibly a conflict with other JavaScript functions on the page.

grzegorz-aleksander-klementowski commented 3 months ago

So, after testing on chrome, I decided to hidden manual scrolling helper and bring back same function which work on Firefox. I decided to do this when I find out that the function partly work on chrome but not always. I found out that there are some “rules” when it works, but I need more time and do more test to describe it. Furthermore, I think it is possible to check when it is not working, and maybe a possibility to fix it, but there is needed of more effort.