Don’t set a focus fallback for Dialog’s in demo mode (#3194)
* Don’t set a focus fallback for Dialog’s in demo mode * Update changelog
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user