File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
src/hooks/document-overflow
@headlessui-vue/src/hooks/document-overflow Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
39
39
- Fix enter transitions in ` Transition ` component ([ #3074 ] ( https://github.com/tailwindlabs/headlessui/pull/3074 ) )
40
40
- Fix focus handling in ` ListboxOptions ` and ` MenuItems ` components ([ #3112 ] ( https://github.com/tailwindlabs/headlessui/pull/3112 ) )
41
41
- Fix horizontal scrolling inside the ` Dialog ` component ([ #2889 ] ( https://github.com/tailwindlabs/headlessui/pull/2889 ) )
42
+ - Don’t cancel ` touchmove ` on ` input ` elements inside a dialog ([ #3166 ] ( https://github.com/tailwindlabs/headlessui/pull/3166 ) )
42
43
43
44
### Changed
44
45
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ export function handleIOSLocking(): ScrollLockStep<ContainerMetadata> {
94
94
( e ) => {
95
95
// Check if we are scrolling inside any of the allowed containers, if not let's cancel the event!
96
96
if ( e . target instanceof HTMLElement ) {
97
+ // Some inputs like `<input type=range>` use touch events to
98
+ // allow interaction. We should not prevent this event.
99
+ if ( e . target . tagName === 'INPUT' ) {
100
+ return
101
+ }
102
+
97
103
if ( inAllowedContainer ( e . target as HTMLElement ) ) {
98
104
// Even if we are in an allowed container, on iOS the main page can still scroll, we
99
105
// have to make sure that we `event.preventDefault()` this event to prevent that.
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ export function handleIOSLocking(): ScrollLockStep<ContainerMetadata> {
94
94
( e ) => {
95
95
// Check if we are scrolling inside any of the allowed containers, if not let's cancel the event!
96
96
if ( e . target instanceof HTMLElement ) {
97
+ // Some inputs like `<input type=range>` use touch events to
98
+ // allow interaction. We should not prevent this event.
99
+ if ( e . target . tagName === 'INPUT' ) {
100
+ return
101
+ }
102
+
97
103
if ( inAllowedContainer ( e . target as HTMLElement ) ) {
98
104
// Even if we are in an allowed container, on iOS the main page can still scroll, we
99
105
// have to make sure that we `event.preventDefault()` this event to prevent that.
You can’t perform that action at this time.
0 commit comments