#modern-pages 3 articles
- 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
- An .html file in a document library cannot be iframed — SharePoint serves it as a downloadgotchas / listsSharePoint serves library HTML as an attachment, so the iframe loads empty; host it elsewhere and allow that host in HTML Field Security
- SharePoint's SPA router hijacks anchor clicks — onClick never firesgotchas / spfxnavigates before React onClick runs; use buttons for in-app actions