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
3939- Fix enter transitions in ` Transition ` component ([ #3074 ] ( https://github.com/tailwindlabs/headlessui/pull/3074 ) )
4040- Fix focus handling in ` ListboxOptions ` and ` MenuItems ` components ([ #3112 ] ( https://github.com/tailwindlabs/headlessui/pull/3112 ) )
4141- 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 ) )
4243
4344### Changed
4445
Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ export function handleIOSLocking(): ScrollLockStep<ContainerMetadata> {
9494 ( e ) => {
9595 // Check if we are scrolling inside any of the allowed containers, if not let's cancel the event!
9696 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+
97103 if ( inAllowedContainer ( e . target as HTMLElement ) ) {
98104 // Even if we are in an allowed container, on iOS the main page can still scroll, we
99105 // 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> {
9494 ( e ) => {
9595 // Check if we are scrolling inside any of the allowed containers, if not let's cancel the event!
9696 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+
97103 if ( inAllowedContainer ( e . target as HTMLElement ) ) {
98104 // Even if we are in an allowed container, on iOS the main page can still scroll, we
99105 // 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