File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Fixed
11
11
12
12
- Improve ` Portal ` detection for ` Popover ` components ([ #1842 ] ( https://github.com/tailwindlabs/headlessui/pull/1842 ) )
13
+ - Fix ` useOutsideClick ` swallowing events inside ShadowDOM ([ #1876 ] ( https://github.com/tailwindlabs/headlessui/pull/1876 ) )
13
14
14
15
## [ 1.7.2] - 2022-09-15
15
16
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export function useOutsideClick(
96
96
'mousedown' ,
97
97
( event ) => {
98
98
if ( enabledRef . current ) {
99
- initialClickTarget . current = event . target
99
+ initialClickTarget . current = event . composedPath ?. ( ) ?. [ 0 ] || event . target
100
100
}
101
101
} ,
102
102
true
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
- Call ` displayValue ` with a v-model of ` ref(undefined) ` on ` ComboboxInput ` ([ #1865 ] ( https://github.com/tailwindlabs/headlessui/pull/1865 ) )
13
13
- Improve ` Portal ` detection for ` Popover ` components ([ #1842 ] ( https://github.com/tailwindlabs/headlessui/pull/1842 ) )
14
14
- Fix crash when ` children ` are ` undefined ` ([ #1885 ] ( https://github.com/tailwindlabs/headlessui/pull/1885 ) )
15
+ - Fix ` useOutsideClick ` swallowing events inside ShadowDOM ([ #1876 ] ( https://github.com/tailwindlabs/headlessui/pull/1876 ) )
15
16
16
17
## [ 1.7.2] - 2022-09-15
17
18
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export function useOutsideClick(
82
82
'mousedown' ,
83
83
( event ) => {
84
84
if ( enabled . value ) {
85
- initialClickTarget . value = event . target
85
+ initialClickTarget . value = event . composedPath ?. ( ) ?. [ 0 ] || event . target
86
86
}
87
87
} ,
88
88
true
You can’t perform that action at this time.
0 commit comments