Step to reproduce:
1. Visit a verge liveblog while it is active. e.g., at the moment wwdc liveblog. [1]
2. Scroll down the page a bit.
3. As updates come in the page scroll position jumps.
This works as expected on Firefox. I mean it is not perfect, on each update there is a visible jump, as the content comes in and scroll position is corrected but in Chrome M58.
I suspected this is a "scroll anchoring" related issue but disabling that didn't fix the issue.
[1] https://live.theverge.com/apple-wwdc-2017-live-blog/?_ga=2.25303549.1151456725.1496675674-270584248.1481125075
Comment 1 by majidvp@chromium.org
, Jun 5 2017I dig some more and using my nifty programmatic scroll detection script found that they indeed have some logic to adjust and maintain the scroll position as they are adding new entry in their live blog: ```js o.once("loaded", function(t) { return function() { var t, n; return e && o.$el.addClass("animate"), o.$el.removeClass("offscreen"), t = o.$el.outerHeight(!0), n = $(window).scrollTop(), o.$el.offset().top < n ? $("body, html").scrollTop(n + t) : void 0 } }(this)), ``` This basically measures the height of new item and tries to update the scroll position to compensate. One wrinke is that it is doing so with a css transition: ``` css .entry.offscreen { width: 100%; transform: translate3d(0, -2rem, 0) scale(1, 0); transform-origin: 50% 0; opacity: 0; } .entry.animate { transition: opacity 250ms linear, border-radius 250ms linear, -webkit-transform 250ms ease; transition: transform 250ms ease, opacity 250ms linear, border-radius 250ms linear; transition: transform 250ms ease, opacity 250ms linear, border-radius 250ms linear, -webkit-transform 250ms ease } ``` So it has an element with scaleY of 0 which is then scaled to 1. So, it adjusts the scroll position and then the element is grown which is why I see the jump in Firefox. I suspect that the issue is that somehow Chrome does not move the content down as the scale is animated to 1? That would make sense if I had scroll anchoring enable but now I am just confused. [1] https://gist.github.com/majido/929eb68d37727d928455