Skip to content

Pasting with long press does not work (in a very specific case) (iOS only) #28990

@M-i-k-e-l

Description

@M-i-k-e-l

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Nothing happens when trying to paste on iOS (long press inside TextInput, not ctrl+v) when:

  1. The TextInput is inside a wrapping View.
  2. The wrapping View has style with flexDirection: 'row'.
  3. The TextInput has style with textAlign: 'center'.
  4. The TextInput has a placeholder.
  5. The placeholder is longer than the size of the TextInput (this is what I think from the testing I've done - see the examples in the example project).

React Native version:

This is from the example project.

System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 451.64 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.13.0 - ~/.nvm/versions/node/v11.13.0/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v11.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29
Build Tools: 26.0.1, 26.0.3, 27.0.3, 28.0.3, 29.0.0
System Images: android-19 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64
Android NDK: 17.2.4988734
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_201 - /usr/bin/javac
Python: 2.7.10 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

  1. Use the example project or copy the small snippet bellow into an existing project.
  2. Long press on the first TextInput to try and paste into it.

Expected Results

The platform's paste option should open (as it does on the other examples I provided in the example project).

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

Example project: https://github.com/M-i-k-e-l/react-native-paste-on-ios/blob/master/App.js
Minimal code:

<View style={{flexDirection: 'row'}}>
  <TextInput style={{textAlign: 'center'}} placeholder="Placeholder"/>
</View>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions