Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
javascript reposition overflow table scroll position

I am drawing a table using a function after data is received from a GET request. After I draw the table, I want to hold the scroll position relative to the previous table that was there before (all tables have overflow:auto;).

The way I overcome this problem is as follows:

  1. listen to the scroll
  2. store the scroll position in sessionStorage
  3. After the new table is drawn, I use .scrolLeft = sessionStorage.getItem('PosY')

This works fine as it does what I want it to do, but I get the following from Chrome Dev.

[Violation] Forced reflow while executing JavaScript took 51ms

I understand why I get this from Chrome Dev. but I want to know if there is another way to do this that will not give me this [Violation]

I have looked into listening to the DOM and repositioning upon changes, but this gives the same [Violation]

Any suggestions would be much appreciated, especially if there is some simple CSS.

No jQuery OR other Libraries, please.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!