www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] Chrome reflow / repaint problem

Hybrid View

  1. #1
    Join Date
    May 2012
    Posts
    3

    resolved [RESOLVED] Chrome reflow / repaint problem

    The code is a simple adding to a div's scrolltop with this code div.scrollTop+=value

    The div has several hundred k of html text, and when the above code is run, there's a one second lag before it updates, as if the div is taking a long time to process.
    However, if the same code is called from within a setInterval of maybe 250ms, after the one sec lag, updates then flash up instantly, indefinitely, showing that the div can be processed fine. I have read up about what causes reflows repaints etc but cannot work out how to get the instant effect without the lag in the timer or ideally outside the timer, its infuriating! thanks

  2. #2
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Do you have the page online somewhere we can peek at?
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  3. #3
    Join Date
    May 2012
    Posts
    3
    Quote Originally Posted by svidgen View Post
    Do you have the page online somewhere we can peek at?
    sorry no, but it's so simple i cant see the point its just the following called from a keydown listener, or from a setinterval.
    function blah(){divnameinavariable.scrollTop+=variablevalue}

    I've tried setting setinterval to 0 and calling it immediately and variations on this but no dice. Always the lag then instant updates if done by timer but no way to get rid of the lag, or to get the instant updates without the timer.

  4. #4
    Join Date
    May 2012
    Posts
    3
    Quote Originally Posted by warped coder View Post
    sorry no, but it's so simple i cant see the point its just the following called from a keydown listener, or from a setinterval.
    function blah(){divnameinavariable.scrollTop+=variablevalue}

    I've tried setting setinterval to 0 and calling it immediately and variations on this but no dice. Always the lag then instant updates if done by timer but no way to get rid of the lag, or to get the instant updates without the timer.
    should read function blah(){divnameinavariable.scrollTop=variablevalue}

    theres literally nothing else going on.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles