How to Fix Forced Scrolling When Embedding Microsoft Forms on a Website
Question details
The user needs to prevent their website from automatically scrolling down to an embedded Microsoft Form once the page and iframe finish loading.

- Product
- Microsoft Forms
- Device & OS
- Windows 11
- Scenario
- Embedding a Microsoft Form via an iframe into a custom website.
- Observed behavior
- After a few seconds of loading, the browser automatically shifts focus to the form and scrolls the webpage downward. This issue primarily affects Windows browsers like Chrome and Edge, but not Apple devices.
Verify that your website code does not contain external JavaScript or conflicting focus commands that actively pull the browser view toward the iframe container upon loading.
Isolate the Issue with Minimal Iframe Testing
Determine if the scrolling behavior is caused by a conflict with your website's scripts or if it is an inherent Microsoft Forms embed issue.
Browser behavior can vary when rendering iframes, especially if the embedded content contains internal scripts that request focus. Testing with a clean slate helps identify the root cause.
Set up a blank HTML page containing nothing but the Microsoft Forms embed iframe code to rule out interference from your site's existing CSS or JavaScript.
Load the minimal test page in Google Chrome and Microsoft Edge on a Windows 11 machine, and compare the behavior against macOS devices to confirm if it is an OS-specific browser rendering issue.
Use your browser's Developer Tools (F12) to monitor network and console events, ensuring no 'autofocus' attributes are inadvertently triggered by the form's internal scripts.

Submit a Developer Support Ticket to Microsoft
If the issue persists on a blank test page without any custom code, the problem lies within the Microsoft Forms backend and requires intervention from Microsoft support.
Looking for a Seamless Document and Form Experience?
While troubleshooting complex website embedding issues with Microsoft Forms, streamline your daily workflow with WPS Office. As a fully compatible, lightweight, and free alternative to Microsoft Office, WPS Office offers comprehensive tools for Word, Excel, PowerPoint, and PDF files without weighing down your system.

Frequently Asked Questions
Why does an embedded iframe cause a webpage to scroll down?
This usually happens when the content inside the iframe includes an active element or script that requests browser focus (like an 'autofocus' attribute on a form field) immediately after it finishes loading.
Does this Microsoft Forms scrolling issue affect all operating systems?
Based on user reports, this specific forced scrolling behavior appears to be isolated to Windows environments, notably affecting browsers like Google Chrome and Microsoft Edge on Windows 11, while Apple devices render the page normally.
Can I use JavaScript to prevent the iframe from scrolling my page?
You can attempt to intercept the scroll behavior using JavaScript on your parent page by tracking the scroll position before the iframe loads and forcibly restoring it, though this can sometimes result in a jittery user experience.




