question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NativeScreenContainer seems blocking android context menu to show up

See original GitHub issue

“react-navigation”: “^3.9.1”, “react-native”: “^0.61.2”,

I am using react navigation stack which uses this library. I was not able to bring android context menu without a force refresh.

This is the issue https://github.com/react-navigation/react-navigation/issues/5476

I am able to get the context menu if I remove NativeScreenContainer from react native stack/StackViewLayout

      <PanGestureHandler
        {...this._gestureActivationCriteria()}
        ref={this.panGestureRef}
        onGestureEvent={this.gestureEvent}
        onHandlerStateChange={this._handlePanGestureStateChange}
        enabled={index > 0 && this._isGestureEnabled()}
      >
        <Animated.View
          style={[styles.container, this._transitionConfig.containerStyle]}
        >
          <StackGestureContext.Provider value={this.panGestureRef}>
            {/* <ScreenContainer style={styles.scenes}> */}
              {scenes.map(this._renderCard)}
            {/* </ScreenContainer> */}
            {floatingHeader}
          </StackGestureContext.Provider>
        </Animated.View>
      </PanGestureHandler>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

28reactions
kmagieracommented, Feb 5, 2020

Many thanks to @compojoom for investigatint this issue – your tips saved me a lot of time and managed to come up with a fix. Also wanted to thank @tombarton for providing me with the repro case. I’ll merge the fix in the next couple of days and publish a new release.

5reactions
kmagieracommented, Feb 5, 2020

Just wanted to paste here the report from @tombarton from #210 as he’d provided a reproducible example:

Copy/paste appears to be breaking in Android when react-native-screens is used with react-navigation 4.0.10. I’ve replicated the issue using React Navigation’s “Get Started” example in both Expo snack and a standalone repo.

Versions:

"react": "16.8.3",
"react-native": "0.60.5",
"react-native-gesture-handler": "1.3.0",
"react-native-screens": "^2.0.0-alpha.7",
"react-navigation": "4.0.10",
"react-navigation-stack": "1.9.3"

Replicable repo:

Expo Snack: snack.expo.io/@tombarton/react-native-screens-copy-paste-android GitHub Repo: tombarton/react-native-screens-copy-paste

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - block context menu from appearing - Stack Overflow
Is there a more efficient way to block the context menu from appearing and prevent the list item from appearing selected?? android ·...
Read more >
Menus - Android Developers
Context menu and contextual action mode: A context menu is a floating menu that appears when the user performs a long-click on an...
Read more >
M.facebook.com blocking long press context menu
To DEV, it seems m.facebook.com has blocked long press context menu, ... I'll get a context menu that comes up (open in tab,...
Read more >
Android Context Menu Example - Javatpoint
Android context menu appears when user press long click on the element. It is also known as floating menu. It affects the selected...
Read more >
Firefox Mobile blocking Context Menu (Long Press) app ...
Does this functionality work everywhere in Android (for example in your Messages app), or just browsers?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found