Skip to content

Commit

Permalink
Don’t set a focus fallback for Dialog’s in demo mode (#3194)
Browse files Browse the repository at this point in the history
* Don’t set a focus fallback for Dialog’s in demo mode

* Update changelog
  • Loading branch information
thecrypticace committed May 10, 2024
1 parent 031b39d commit 4eff138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/@headlessui-react/CHANGELOG.md
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- [internal] Don’t set a focus fallback for Dialog’s in demo mode ([#3194](https://github.com/tailwindlabs/headlessui/pull/3194))

## [2.0.3] - 2024-05-07

Expand Down
Expand Up @@ -393,7 +393,7 @@ function DialogFn<TTag extends ElementType = typeof DEFAULT_DIALOG_TAG>(
<PortalWrapper>
<FocusTrap
initialFocus={initialFocus}
initialFocusFallback={internalDialogRef}
initialFocusFallback={__demoMode ? undefined : internalDialogRef}
containers={resolveRootContainers}
features={focusTrapFeatures}
>
Expand Down

0 comments on commit 4eff138

Please sign in to comment.