Yahoo Canada Web Search

Search results

  1. Apr 7, 2016 · How does this change affect JavaScript scrolling? In short - it doesn't. This change alters the effect of scrolling caused by reflows. For example, adding a class name to an element that causes it to increase in height will cause a reflow and scroll anchoring will prevent the page from jumping around. Calling window.scrollTo(0, 1) (Yes the old ...

    • Overview
    • How does it work?
    • How do I turn on scroll anchoring?
    • What if I need to debug it?
    • What if I need to disable it?
    • Further reading
    • Browser compatibility

    As a user of the web, you are probably familiar with the problem that scroll anchoring solves. You browse to a long page on a slow connection and begin to scroll to read the content; while you are busy reading, the part of the page you are looking at suddenly jumps. This has happened because large images or some other elements have just loaded further up in the content.

    Scroll anchoring is a browser feature that aims to solve this problem of content jumping, which happens if content loads in after the user has already scrolled to a new part of the document.

    Scroll anchoring adjusts the scroll position to compensate for the changes outside of the viewport. This means that the point in the document the user is looking at remains in the viewport, which may mean their scroll position actually changes in terms of how far they have moved through the document.

    You don't! The feature is enabled by default in supporting browsers. In most cases anchored scrolling is exactly what you want — content jumping is a poor experience for anyone.

    If your page is not behaving well with scroll anchoring enabled, it is probably because some scroll event listener is not handling well the extra scrolling to compensate for the anchor node movement.

    You can check whether disabling scroll anchoring fixes the issue in Firefox by changing layout.css.scroll-anchoring.enabled to false in about:config.

    If it does, you can check what node is Firefox using as the anchor using the layout.css.scroll-anchoring.highlight switch. That will show a purple overlay on top of the anchor node.

    If one node doesn't seem appropriate to be an anchor, you can exclude it using overflow-anchor, as described below.

    The specification provides a new property, overflow-anchor, which can be used to disable scroll anchoring on all or part of the document. It's essentially a way to opt out of the new behavior.

    The only possible values are auto or none:

    •auto is the initial value; as long as the user has a supported browser the scroll anchoring behavior will happen, and they should see fewer content jumps.

    •none means that you have explicitly opted the document, or part of the document, out of scroll anchoring.

    To opt out the entire document, you can set it on the element:

    To opt out a certain part of the document use overflow-anchor: none on its container element:

    •Explainer document on the WICG site

    •Scroll anchoring for web developers on the Chromium blog

    Compatibility notes

    If you need to test whether scroll anchoring is available in a browser, use Feature Queries to test support for the overflow-anchor property.

  2. Sep 5, 2024 · Method 2: Enable Scroll Anchoring through Chrome Settings. Open Google Chrome and click the three vertical dots in the top-right corner to access the Chrome menu. Click “Settings” from the drop-down menu. Scroll down to the “Appearance” section and click “Advanced”. Under the “Accessibility” section, toggle the switch next to ...

  3. The latest update to Chrome introduces scroll anchoring, which locks the content you’re currently looking at to the screen so you can keep reading easily. Ob...

    • 16 sec
    • 101.5K
    • Kenji Baheux
  4. Apr 11, 2017 · These annoying page jumps typically happen when the website inserts an image or other content above the visible area, pushing down what’s on the screen. With the newest Chrome update, we’re introducing something called scroll anchoring, which locks the content you’re currently looking at to the screen, keeping you in the same spot so you ...

  5. Jun 28, 2016 · Enable scroll anchoring to prevent annoying page jumps whenever you load a new page with lots of offscreen content. Go to chrome://flags to enable it.

  6. People also ask

  7. Jul 1, 2016 · TL;DR: Re-use your DOM elements and remove the ones that are far away from the viewport. Use placeholders to account for delayed data. Here’s a demo and the code for the infinite scroller. Infinite scrollers pop up all over the internet. Google Music’s artist list is one, Facebook’s timeline is one and Twitter’s live feed is one as well.

  1. People also search for