SharePoint / SharePoint/sp-dev-docs

Rendering issue of Fluent UI Dialog and Drawer caused by issue in SharePoint

Open
#9,847 6 comments 2 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Apr 29, 2025.

Needs: Triage :mag: sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • browser version: Newest
  • SPFx version: 1.18
  • Node.js version 18
  • etc
Describe the bug / error

When rendering the Fluent UI 9 components Drawer or Dialog the styling becomes messed up. I made a report with the Fluent UI team here: https://github.com/microsoft/fluentui/issues/32253
They pointed to this being a bug in SharePoint and this is why I post here. Something about mismatch of context versions.
The issue only happens in SharePoint context, like the workbench.
I have made a simple reproduction here based on the Hello World getting started web part: https://github.com/jcoolsen/SampleForStylingIssue

Below information is copied in from the other issue:
Actual Behavior
When using the Drawer or Dialog components in a SharePoint Online context, like a web part in a site or in the workbench, they are missing their base styling variable definitions. This appears to be because they refer to the wrong fui-FluentProvider# class. Often they refer to "fui-FluentProvider1" but should point to a different number in the class attribute. As far as I can see, this is not caused by any change in the Fluent UI components themselves, but rather by some unknown (recent?) change in the SharePoint Online platform that somehow breaks compatibility.
The effect is that the rendering becomes bad, nearly unreadable.

This is what we see:
image
Underlying HTML from above:
image

Steps to reproduce
  1. Run the referenced reproduction: "npm i" and "gulp serve"
  2. Click button "Open Drawer" or "Open Dialog".
  3. Note how the styling breaks because fui-FluentProvider# numbering does not match the proper element id in the rendered HTML.
Expected behavior

Below information is copied in from the other issue:
Expected Behavior
I expect the components to display properly.

This is what we want:
image
(the thick black border is caused by the Windows snipping tool)
Underlying HTML from above:
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.