Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: OverlayDrawer component stop working with NextJS 14.2+ #31930

Closed
2 tasks done
shaohaolin opened this issue Jul 5, 2024 · 5 comments
Closed
2 tasks done

[Bug]: OverlayDrawer component stop working with NextJS 14.2+ #31930

shaohaolin opened this issue Jul 5, 2024 · 5 comments

Comments

@shaohaolin
Copy link

shaohaolin commented Jul 5, 2024

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh

Are you reporting Accessibility issue?

None

Reproduction

https://stackblitz.com/edit/nextjs-ytg51y?file=app%2Fcomponents%2FExample.tsx

Bug Description

Actual Behavior

In the sandbox, noticed the NextJS version is 14.2.0, clicking on the button, OverlayDrawer component does not open the drawer.

Expected Behavior

In the sandbox where NextJS version is 14.1.0, clicking on the button, OverlayDrawer component open the drawer.

Logs

useFocusFirstElement.js:22  @fluentui/react-dialog [useFocusFirstElement]:
A Dialog should have at least one focusable element inside DialogSurface.
Please add at least a close button either on `DialogTitle` action slot or inside `DialogActions`

Requested priority

Blocking

Products/sites affected

Skill Editor

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@ling1726 ling1726 added Component: Drawer The Fluent v9 Drawer component and removed Needs: Triage 🔍 labels Jul 8, 2024
@layershifter layershifter added Type: Regression 🌩🌩 Lightning strikes twice. and removed Type: Regression 🌩🌩 Lightning strikes twice. labels Jul 8, 2024
@elliot-huffman
Copy link

elliot-huffman commented Jul 9, 2024

I can repro this on my project. It is blocking for us as we can't publish newer versions until this is fixed.

This issue is also affecting the dialog component, not just the drawer.

@layershifter
Copy link
Member

FYI it works with reactStrictMode: false, https://stackblitz.com/edit/nextjs-juc3mq?file=next.config.js. Disabling Strict Mode looks like a reasonable workaround.

It looks that the source of the issue is Portal component:

Seems like the source of the issue is microsoft/use-disposable#31 as Next.js uses React 18.3.0 canary.

@elliot-huffman
Copy link

FYI it works with reactStrictMode: false, https://stackblitz.com/edit/nextjs-juc3mq?file=next.config.js. Disabling Strict Mode looks like a reasonable workaround.

It looks that the source of the issue is Portal component:

Seems like the source of the issue is microsoft/use-disposable#31 as Next.js uses React 18.3.0 canary.

I disabled strict mode, and it is indeed fixed!
Thanks for the workaround :)

I look forward to microsoft/use-disposable#31 getting fixed!

@shaohaolin
Copy link
Author

Verified the workarounds, thanks @layershifter !

@layershifter
Copy link
Member

Duplicate of #31429

@layershifter layershifter closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
@layershifter layershifter marked this as a duplicate of #31429 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants