facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.75k stars 24.16k forks source link

TextInput contextMenuHidden not working when using a mouse on Android device #45355

Open ghost opened 1 month ago

ghost commented 1 month ago

Description

When using a mouse plugged into an Android device, the context menu is showing when selecting the TextInput's content even though the contextMenuHidden prop is used

Steps to reproduce

  1. Plug a mouse in the Android device
  2. Run the application
  3. Type some text in the TextInput
  4. Select the text
  5. The context menu is showing

React Native Version

0.74.3

Affected Platforms

Runtime - Android, Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 1.10 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.15.0
    path: ~/.volta/tools/image/node/18.15.0/bin/node
  Yarn:
    version: 4.1.1
    path: ~/.volta/tools/image/yarn/4.1.1/bin/yarn
  npm:
    version: 9.5.0
    path: ~/.volta/tools/image/node/18.15.0/bin/npm
  Watchman:
    version: 2023.09.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK: Not Found
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11255304
  Xcode:
    version: /undefined
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.20.1
    path: /Users/strgazrs/.jenv/shims/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/Bz0bpK2r2Cp5cAk6GdbhW

Screenshots and Videos

IMG_20240709_193101

shubhamguptadream11 commented 1 month ago

I think this issue is fixed here. https://github.com/facebook/react-native/pull/45014/files And tracked here: https://github.com/facebook/react-native/issues/36619