lesnofancy.blogg.se

Page scrolls down by itself
Page scrolls down by itself










The code worked fine for last 6 months, so I think it's something new that Chrome made. We just discovered this Chrome weird behavoir this week. X.insertBefore(e, x.childNodes.length?x.childNodes:null) Į.setAttribute("style", "border:solid 2px blue width:100px height:20px")

page scrolls down by itself

It may looks logical in this simple example, but consider that the dynamic block is only one of many blocks on the page and there's no reason to scroll the whole content because something changing inside the block.

page scrolls down by itself

You will see that all content (numbers 1,2,3.) is scrolling by itself when the blue box stays on same place. Just open it in Chrome, and scroll a little bit down so the one of the blue boxes will be on the very top border of viewport. It's hard to explain in words, but much easier to demonstrate. Now Chrome browser somehow "capture" the one div on the page and scroll down the whole content. Everything worked just fine until recently.

page scrolls down by itself

We have rich page where we have one little block with dynamic content.












Page scrolls down by itself