diff --git a/packages/@headlessui-react/src/components/dialog/dialog.test.tsx b/packages/@headlessui-react/src/components/dialog/dialog.test.tsx
index 82646e0..dafed13 100644
--- a/packages/@headlessui-react/src/components/dialog/dialog.test.tsx
+++ b/packages/@headlessui-react/src/components/dialog/dialog.test.tsx
@@ -440,6 +440,28 @@ describe('Rendering', () => {
expect(document.documentElement.style.overflow).toBe('')
})
)
+
+ it(
+ 'should not have a scroll lock when the transition marked as not shown',
+ suppressConsoleLogs(async () => {
+ function Example() {
+ return (
+
+
+
+ )
+ }
+
+ render()
+
+ await nextFrame()
+
+ // The overflow should NOT be there
+ expect(document.documentElement.style.overflow).toBe('')
+ })
+ )
})
describe('Dialog.Overlay', () => {
diff --git a/packages/@headlessui-vue/CHANGELOG.md b/packages/@headlessui-vue/CHANGELOG.md
index 5786acf..4dd6dfa 100644
--- a/packages/@headlessui-vue/CHANGELOG.md
+++ b/packages/@headlessui-vue/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix focus styles showing up when using the mouse ([#2347](https://github.com/tailwindlabs/headlessui/pull/2347))
- Disable `ComboboxInput` when its `Combobox` is disabled ([#2375](https://github.com/tailwindlabs/headlessui/pull/2375))
- Add `FocusTrap` event listeners once document has loaded ([#2389](https://github.com/tailwindlabs/headlessui/pull/2389))
+- Don't scroll-lock `