Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Etsi tuesta

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Updating the position of element in DOM over scroll is delayed when smooth scrolling is enabled

  • 2 vastausta
  • 1 henkilöllä on sama ongelma
  • 1 näyttö
  • Viimeisin kirjoittaja pragav94

more options

I am trying to add a SVG element next to the form labels with absolute position. When there is a scroll I am listening to scroll event and updating the position of the SVG. When smooth scrolling is enabled the SVG tends to bounce over continuous scrolling. This bouncing is observed in macOS Chrome and in FireFox when smooth scrolling is enabled.

In Linux/Windows, this can be reproduced by using smooth scroll smooth scroll chrome extension.

I've captured the bouncing due to scroll in this recording

bounce due to scroll

I am trying to add a SVG element next to the form labels with absolute position. When there is a scroll I am listening to scroll event and updating the position of the SVG. When smooth scrolling is enabled the SVG tends to bounce over continuous scrolling. This bouncing is observed in macOS Chrome and in FireFox when smooth scrolling is enabled. In Linux/Windows, this can be reproduced by using [https://chrome.google.com/webstore/detail/smoothscroll/nbokbjkabcmbfdlbddjidfmibcpneigj smooth scroll] smooth scroll chrome extension. I've captured the bouncing due to scroll in this recording [[bounce due to scroll|bounce due to scroll]]

Kaikki vastaukset (2)

more options

Link to jsfiddle Link to jsfiddle

more options

pragav94 said

I am trying to add a SVG element next to the form labels with absolute position. When there is a scroll I am listening to scroll event and updating the position of the SVG. When smooth scrolling is enabled the SVG tends to bounce over continuous scrolling. This bouncing is observed in macOS Chrome and in FireFox when smooth scrolling is enabled. In Linux/Windows, this can be reproduced by using smooth scroll smooth scroll chrome extension. I've captured the bouncing due to scroll in this recording Screen Recording Link to jsfiddle Link to jsfiddle