logo
search
Others

How to Stop a SharePoint Embedded Web Part from Scrolling the Main Page

Amos GikundaAmos Gikunda Oct 9, 2026 869 views

Question details

The user needs to prevent an embedded chatbot within a SharePoint Web Part from causing the entire SharePoint page to scroll when new messages are sent or received.

How to Stop a SharePoint Embedded Web Part from Scrolling the Main Page
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Embedding a third-party application or chatbot into a SharePoint page using an iframe Embed Web Part.
Observed behavior
When new messages appear, both the chatbot's message log and the surrounding SharePoint main page scroll simultaneously. This occurs across multiple browsers even when the iframe scrolling attribute is disabled.
Before you start

Ensure you have page editing permissions in SharePoint and, if possible, administrative access to the source code of the embedded chatbot application.

Solution 1Recommended

Modify the Embedded Application's JavaScript and CSS

The most effective solution is to address the scrolling behavior directly within the embedded application's code, preventing it from forcing the parent page to move.

The iframe 'scrolling' attribute only controls the scrollbars of the iframe itself. If the embedded application uses JavaScript functions like scrollIntoView() or sets focus on new elements, the browser will automatically scroll the main SharePoint page to bring those elements into view.

1
Access the source code

Open the source code or developer settings for the embedded chatbot application.

2
Locate focus behaviors

Search the JavaScript code for functions such as element.scrollIntoView() or element.focus() that trigger when new messages are added.

3
Apply CSS containment

Wrap the message log in a fixed-height container using CSS. Apply the property 'overflow-y: auto' to this container so that scrolling is strictly contained within the chat area.

4
Save and republish

Save the changes to your chatbot application and refresh the SharePoint page to verify the main page no longer scrolls.

Modify the Embedded Application's JavaScript and CSS
Best Practice: Using CSS overflow containment is the standard web development practice for keeping widget scrolling independent of the parent page.
Free Microsoft Office alternative

Looking for a seamless alternative to Microsoft Office? Try WPS Office.

While troubleshooting complex SharePoint and web part integrations, streamline your daily document, spreadsheet, and presentation tasks with WPS Office. It provides a highly compatible, lightweight, and free alternative to the Microsoft Office suite.

  1. 1. Download the installer: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the software: Run the downloaded installer and follow the quick on-screen instructions to set up WPS Office.
  3. 3. Open your documents: Launch WPS Office and open your existing Microsoft Office files directly with perfect formatting compatibility.
High compatibility with Microsoft Word, Excel, and PowerPoint formats.Lightweight application that runs smoothly on all Windows, Mac, and mobile devices.Completely free to use with a familiar, easy-to-navigate tabbed interface.Features built-in PDF editing tools for comprehensive document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why does scrolling="no" on my iframe not stop the SharePoint page from scrolling?

The scrolling="no" attribute only disables the visual scrollbars on the iframe element itself. If the application inside the iframe executes JavaScript commands like element.scrollIntoView() or sets focus on new text elements, modern web browsers will automatically scroll the parent SharePoint page to bring that focused element into the user's viewport.

Can I block an iframe from scrolling the parent page using SharePoint settings?

No, SharePoint's native Embed Web Part settings cannot block a cross-origin iframe's internal JavaScript from triggering browser-level focus scrolling. The resolution must be implemented directly within the embedded application's source code.

What CSS properties help contain scrolling within a specific element?

To prevent an element from affecting the main page's scroll position, give its container a fixed height (for example, height: 400px;) and apply the CSS property overflow-y: auto;. This configuration forces the content to scroll only within that specific container.

Will using a different web browser fix the iframe scrolling issue?

Typically, no. The automatic scrolling behavior triggered by JavaScript focus or scroll commands is a standardized accessibility and usability feature across most modern browsers, including Google Chrome, Microsoft Edge, and Mozilla Firefox.