react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Text not selectable on web

Open RWOverdijk opened this issue 5 years ago • 2 comments

Current Behavior

I'm in the beautiful world of React navigation + React-native-web and when using react-navigation the text on the page can no longer be selected. In an issue I made on the react-navigation repository I got pointed in the direction of this one.

I then found this PR which was closed by the author for some reason. I just installed it locally and it seems to work fine (minus the text being selected when I start dragging to for example close a modal, but I can't have it both ways I suppose).

Expected Behavior

Text to be selectable

How to reproduce

Call npx expo init and pick the managed workflow "tabs" (several example screens and tabs using react-navigation).

When that's done navigate into the new project created and just run yarn web. After some time the webpage will open and none of the text on it is selectable.

I've tried the master branch and text is not selectable. So far the closest thing to a fix I've found is the PR I mentioned earlier.

RWOverdijk avatar Apr 22 '20 07:04 RWOverdijk

@RWOverdijk I had the same issue before. Since I upgraded from react-navigation 4.x to react-navigation 5.x the problem went away, together with some other issues. It might take you a bit to update (if you haven't yet), but it's definitely worth it.

sreuter avatar Sep 16 '20 01:09 sreuter

Text should be selectable from 2.6.1. However, if text is inside ScrollView, it may still be unselectable due to activation of NativeViewGestureHandler.

Note that this change is available in new web implementation. To enable it, call enableExperimentalWebImplementation() in the root of your project

m-bert avatar Sep 21 '22 12:09 m-bert

I'll close the issue since the new web implementation is enabled by default starting with 2.10.0.

j-piasecki avatar May 17 '23 10:05 j-piasecki