react-native: TextInput contextMenuHidden prop not working for double tap

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

<TextInput contextMenuHidden={true} />

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

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

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