Content-Length: 247770 | pFad | http://github.com/facebook/react-native/pull/49446

27 Add prop to disable drag and drop pasting on Android by Abbondanzo · Pull Request #49446 · facebook/react-native · GitHub
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

Add prop to disable drag and drop pasting on Android #49446

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Abbondanzo
Copy link
Contributor

Summary:
On Android, by default, every EditText accepts DragEvent and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input. This change adds a new prop disableDragAndDropPasting to do exactly that: reject drag and drop events by telling the system to ignore the event and, by proxy, disabling behavior that automatically focuses the text input.

Changelog: [Android][Added] - Add new prop for removing drag and drop targeting to text inputs

Differential Revision: D69674225

Summary:
On Android, by default, every EditText accepts `DragEvent` and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input. This change adds a new prop `disableDragAndDropPasting` to do exactly that: reject drag and drop events by telling the system to ignore the event and, by proxy, disabling behavior that automatically focuses the text input.

Changelog: [Android][Added] - Add new prop for removing drag and drop targeting to text inputs

Differential Revision: D69674225
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69674225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/pull/49446

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy