Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add allowMobileScroll prop to allow for clicks to optionally pass through on mobile #760

Merged
merged 4 commits into from
Aug 10, 2024

Conversation

tnrich
Copy link
Contributor

@tnrich tnrich commented Aug 8, 2024

Fixes #728

@STRML let me know if this PR looks good to you. Thanks!

Add doNotPreventMobileScroll prop to allow for clicks to optionally pass through on mobile

@STRML
Copy link
Collaborator

STRML commented Aug 8, 2024

Can you please invert it: "preventMobileScroll", default true.

@tnrich
Copy link
Contributor Author

tnrich commented Aug 8, 2024

What about "allowMobileScroll"? I prefer having the default be false @STRML

lib/DraggableCore.js Outdated Show resolved Hide resolved
@STRML STRML changed the title fix: add doNotPreventMobileScroll prop to allow for clicks to optionally pass through on mobile fix: add allowMobileScroll prop to allow for clicks to optionally pass through on mobile Aug 10, 2024
@STRML STRML merged commit 067fbdb into react-grid-layout:master Aug 10, 2024
@STRML
Copy link
Collaborator

STRML commented Aug 10, 2024

Thanks for the contribution. Please see the additional commit for fixups.

@tnrich
Copy link
Contributor Author

tnrich commented Aug 12, 2024

Thanks @STRML !! Much appreciated 🙏


const e = new Event('touchstart');
// Oddly `e.defaultPrevented` is not changing here. Maybe because we're not mounted to a real doc?
let pdCalled = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one @STRML , thanks for adding a test! my Achilles heel!

@tnrich
Copy link
Contributor Author

tnrich commented Aug 27, 2024

@STRML it appears that I need a new release in order to be able to use the updated code. Do you think you could do that plz!

Thanks!

image

@taniaprocha
Copy link

taniaprocha commented Sep 20, 2024

When do we have the next release to use this allowMobileScroll prop?

@consistent-k
Copy link

@STRML @tnrich Which version supports the use of this new prop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not possible to listen to click events inside a Draggable on Mobile
4 participants