Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

تلاش سپورٹ

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.

مزید سیکھیں

یہ تھریڈ کو بند اور آرکائیو کیا گیا تھا۔ اگر آپ کو مدد کی ضرورت ہو تو براہ مہربانی نیا سوال پوچھیں۔

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

  • 2 جواب دیں
  • 1 میں یہ مسئلہ ہے
  • 132 دیکھیں
  • آخری جواب بذریعہ SuMo Bot

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]]

تمام جوابات (3)

Link to jsfiddle Link to jsfiddle

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

This question has been locked because the original author has deleted their account. While you can no longer post new replies, the existing content remains available for reference.