Webflow sync, pageviews & more.
NEW

What could be causing my Webflow portfolio website to automatically scroll to a certain point when opening the exported site, without any anchor links attached to the URL in the browser?

TL;DR
  • Check for autofocus on form elements that may trigger scrolling on load.
  • Review custom JavaScript in page or site settings for scroll-related commands.
  • Inspect load interactions, animations, or reflows from lazy-loaded content or embeds.
  • Test for targeted element IDs and CMS-driven layout shifts causing unexpected scroll behavior.

If your Webflow-exported portfolio site is automatically scrolling on load (without anchor links present in the URL), the issue is likely related to how elements are being loaded or focused in the DOM.

1. Check for Auto-Focus or Input Focus

  • If a form input, text area, or other focusable element has autofocus enabled, the browser may scroll to bring that element into view on page load.
  • In Webflow, go to the element settings panel and look for any that have Autofocus enabled. This can happen by default with form fields.

2. Review Custom Code

  • Look in your Page Settings > Before / After Body Tag sections for any custom JavaScript that may programmatically scroll using scrollIntoView() or window.scrollTo().
  • Also check in the Site Settings > Custom Code area for global scripts that might be causing this.

3. Check for Native Browser Behavior with CMS Content

  • If you're using Webflow CMS and have dynamic content loading, especially with tabs or sliders, elements may shift due to image loading or Webflow’s IX2 animations, causing browsers to adjust scroll positions post-load.

4. Inspect Load Interactions

  • Go to the Page Trigger (Page Load) in interactions and make sure there isn’t an animation or scroll action being triggered when the page loads.
  • Even if the animation isn't obviously moving the scroll, certain positioning transitions (like scroll position changes or element reveals) can cause unintended scroll behavior.

5. Test Lazy Loading or Embedded Media

  • Images with lazy loading or embedded iframes (like YouTube videos or maps) can reflow page content during load, pushing the viewport unexpectedly.
  • Try disabling lazy loading for images near the top or reordering embeds as a test.

6. Inspect DOM for IDs Being Targeted

  • Although no anchor is in the URL, check if any script or framework is looking for a specific element with a given ID and scrolling to it manually based on some internal logic.
  • This can also happen with hash fragments restored from session, depending on browser behavior.

Summary

Your Webflow site likely scrolls automatically due to autofocus on an input, custom JavaScript scroll code, or reflow from lazily loading content. Review element settings, page interactions, custom code, and any inputs or embedded media near the target scroll position. Disable each probable cause one by one to isolate the issue.

Rate this answer

Other Webflow Questions