#scrolling 3 articles
- behavior: 'smooth' is silently ignored inside a portaled overlaygotchas / spfxJump-to-section does nothing in a modal/reader; drop the flag and set scrollTop directly
- window.scrollTo does nothing in an SPFx web part on a modern pagegotchas / spfxThe page scrolls inside a canvas element, not the window; switching views in a single-page web part leaves the user mid-page. Find the real scrolling ancestor and reset that
- A textarea jumps after you change its text from code and restore the selectiongotchas / spfxfocus() scrolls the page to the element and, in Chromium, setSelectionRange scrolls the textarea to the end of the selection; restore the selection with focus({ preventScroll }) and put scrollTop back