Skip to content

Conversation

@filkalny-thimble
Copy link

Fixes issue #221 by allowing user to call preventDefault manually within event handlers instead of having it always called for them.

@filkalny-thimble filkalny-thimble force-pushed the optional-preventDefault branch from 977ec8c to 0c7746d Compare July 5, 2021 10:01
@filkalny-thimble filkalny-thimble force-pushed the optional-preventDefault branch from 0c7746d to 208c773 Compare July 5, 2021 10:15
@mallchel
Copy link

#553 (comment)

@STRML
Copy link
Collaborator

STRML commented Dec 31, 2025

Closing this PR as stale. While this preventDefault prop received an approval, the PR has been open since 2021 without being merged. If this feature is still desired, please open a fresh PR against the current codebase (React 19 compatible). Thank you for the contribution!

@STRML STRML closed this Dec 31, 2025
@STRML
Copy link
Collaborator

STRML commented Dec 31, 2025

Reopening - this is a commonly requested feature for mobile touch scrolling.

@STRML STRML reopened this Dec 31, 2025
@STRML
Copy link
Collaborator

STRML commented Dec 31, 2025

Closing - Already Implemented!

This feature is already implemented in the current codebase as allowMobileScroll prop. See:

  • Line 92-93 in DraggableCore.js: allowMobileScroll: PropTypes.bool
  • Line 314: if (e.type === 'touchstart' && !this.props.allowMobileScroll) e.preventDefault();

Usage is functionally equivalent (just inverted logic):

// Your proposed API:
<Draggable preventDefault={false}>
// Current API (same effect):
<Draggable allowMobileScroll={true}>

Thank you for the contribution - your idea made it into the library!

@STRML STRML closed this Dec 31, 2025
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.

5 participants