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

TextInput contextMenuHidden prop not working for double tap #36619

Closed
musi1024 opened this issue Mar 24, 2023 · 22 comments
Closed

TextInput contextMenuHidden prop not working for double tap #36619

musi1024 opened this issue Mar 24, 2023 · 22 comments
Labels
Component: TextInput Related to the TextInput component. Needs: Author Feedback Stale There has been a lack of activity on this issue and it may be closed soon. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@musi1024
Copy link

Description

Hello,

I'm experiencing an issue with the TextInput component. When I set the contextMenuHidden prop to true, I expect the default context menu to be disabled and not appear when double tapping on the input field. However, the context menu still appears on double tap.

Expected behavior:
The default context menu should not appear when double tapping on the input field.

Actual behavior:
The default context menu still appears when double tapping on the input field.

Environment:
Operating system: [e.g. Android]
React Native version: 0.67.2

React Native Version

0.67.2

Output of npx react-native info

System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M1
Memory: 111.06 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.21.3 - ~/.nvm/versions/node/v14.21.3/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 6.14.18 - ~/.nvm/versions/node/v14.21.3/bin/npm
Watchman: 2023.03.06.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/xxx/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 25, 27, 28, 30, 33, 33
Build Tools: 30.0.2
System Images: android-30 | ARM 64 v8a, android-30 | Intel x86_64 Atom, android-30 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.2 => 0.67.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Steps to reproduce:

  • Add a TextInput component to a screen
  • Set the contextMenuHidden prop to true
  • Double tap on the input field

Snack, code example, screenshot, or link to a repository

@github-actions github-actions bot added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Mar 24, 2023
@github-actions
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@musi1024
Copy link
Author

I tried using react-native 0.71 and still had this problem。

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 27, 2023
@tailesmd
Copy link

Does any one have any solution for this issue?

@cortinico cortinico added Needs: Triage 🔍 and removed Needs: Attention Issues where the author has responded to feedback. labels May 17, 2023
@github-actions
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@github-actions github-actions bot added Needs: Author Feedback Component: TextInput Related to the TextInput component. and removed Needs: Triage 🔍 labels May 17, 2023
@github-actions
Copy link

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 11, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions
Copy link

This issue was closed because the author hasn't provided the requested feedback after 7 days.

@jeffthemaximum
Copy link

jeffthemaximum commented Aug 23, 2023

I have this issue, too, on version 0.71.8. Curious if anyone has found a solution or workaround.

@mrshahzeb7
Copy link

any solution ?

contextMenuHidden not workin on double tap (android)

@diaa-ghonim2
Copy link

@mrshahzeb7

have you found a solution??
because it is happening with me on android as well.

@mrshahzeb7
Copy link

@mrshahzeb7

have you found a solution??
because it is happening with me on android as well.

I didn't found a proper solution for Android so i handled it through code
Just don't allow user to select text in the text input

This is what I did
https://stackoverflow.com/a/54897489

@axel127
Copy link

axel127 commented Dec 19, 2023

I still have this issue on 0.72.3.

@fabOnReact
Copy link
Contributor

Do you still experience this issue?

I have four years of experience maintaining facebook/react-native and I specialize in the Text and TextInput components. I currently have 58 facebook/react-native PRs.

If you still experience this issue, I will prepare a patched release with the fix.

Thanks a lot

@ekam1408
Copy link

ekam1408 commented Feb 1, 2024

Hey @fabOnReact
I'm still facing this issue on 0.72.4
It would be great if you could add a fix for this. Thank you!

@Vincenttbk
Copy link

Hi @fabOnReact
It is also happening for me on 0.72.6

@alanleedev
Copy link
Contributor

This issue is fixed here: PR #45014

@arthedza
Copy link

arthedza commented Jul 5, 2024

@alanleedev Thanks! What release will this fix go into?

@alanleedev
Copy link
Contributor

@arthedza This will be released in 0.76 as it did not make the branch cut for 0.75.

@Lakston
Copy link

Lakston commented Sep 25, 2024

will this patch be rolled out on earlier versions too ? Since 0.76 will bump ios minimum version to iOS 15.1, updating to 0.76 is not a viable solution for a lot of projects.

@alanleedev
Copy link
Contributor

will this patch be rolled out on earlier versions too ? Since 0.76 will bump ios minimum version to iOS 15.1, updating to 0.76 is not a viable solution for a lot of projects.

@Lakston We can backport it to 0.75, 0.74, 0.73. Will update here once it is released.

@Lakston
Copy link

Lakston commented Sep 26, 2024

Great news thanks, we are using 73 at the moment but I have the update to 75 in sight (since we can't update to 76, that would cut off too many users on our end) 👍

@Lakston
Copy link

Lakston commented Oct 3, 2024

Follow up, I just saw that react native patches 75.4 just came out including this fix, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: TextInput Related to the TextInput component. Needs: Author Feedback Stale There has been a lack of activity on this issue and it may be closed soon. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests