Repository navigation
Conversation
…n/react-native into add-context-menu-control
|
@hramos Here is the new PR. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
Its still showing the context menu. I can able to paste into the field. How to disable it? |
|
In which react-native version this works? |
|
This hasn’t been included in a release yet. |
|
You can always see what release any commit is in by clicking on the link and looking at the tags. This commit landed only 7 days ago, so I wouldn't expect it to be on a stable release until 0.55. |
|
@amhinson Were you able to confirm that this works on Android? I'm using 0.55.4, which includes the new prop, and it works on iOS, but on Android, the context menu still appears when tapping on text in the input. |
|
@robinheinze I did confirm that it worked on a few Android devices, although maybe some devices behave differently? |
|
@amhinson |
|
Ah good catch! I was definitely only accounting for long press. |
@amhinson Can you please add double click handler as the issue still present after almost a year? The solution works perfectly for the long press but not for the double press. Thanks a lot in advance! |
Motivation
There is currently no way to disable to context menu that automatically appears over a TextInput. This is especially troublesome if you would like to disable the user from pasting text into certain fields. This PR adds a
contextMenuHiddenproperty to TextInput that will hide it.Test Plan
I'm not sure if testing is necessary here. I would be happy to investigate further on how this would be tested, if deemed necessary!
Related PRs
react/react-native-website#95
Release Notes
[FEATURE][TextInput] - Added
contextMenuHiddenproperty