Coder Social home page Coder Social logo

Comments (14)

nandorojo avatar nandorojo commented on September 17, 2024 2

ah that’s not good! i’m working through some other issues with the menu but i’ll try to address this if the reason becomes apparent. it’s hard coordinating with native view controllers for these edge cases

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024 1

@peterferguson this is getting fixed upstream in the context menu v2:

dominicstop/react-native-ios-context-menu#77 (comment)

from zeego.

sidorchukandrew avatar sidorchukandrew commented on September 17, 2024 1

@peterferguson There's a new version of react-native-ios-context-menu out.

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024 1

There are some fixes underway for v2

from zeego.

peterferguson avatar peterferguson commented on September 17, 2024

Found this on issue that solves the problem

dominicstop/react-native-ios-context-menu#9 (comment)

Maybe for zeego is it just better to have this documented somewhere?

A FAQ or common pitfalls section?

I will leave it up to you whether to close or not (might be worth leaving open if you are open to the docs changes?)

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024

Oh yeah that does make sense. I wonder if we should make it the default behavior or not. Or I also wonder if there is a way to fix this upstream entirely.

from zeego.

peterferguson avatar peterferguson commented on September 17, 2024

Seems like it could be simple enough to check if the child passed to the trigger has onLongPress set and if not override it.

Also a reasonably small change that (on first glance) shouldn't have many repercussions in other trigger use-cases.

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024

The issue is, the child of the context menu could be anywhere (as in multiple children down).

So if a nested child is the pressable, it won't get auto-fixed.

from zeego.

sidorchukandrew avatar sidorchukandrew commented on September 17, 2024

This seems to still be happening on the latest version of zeego (1.7.2) and react-native-ios-context-menu (2.3.0). Is it possible that zeego needs to set shouldPreventLongPressGestureFromPropagating on the ContextMenuView? It looks like it's a new prop (I don't know much Swift but it also looks like the default value is getting set to true)

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024

Hmm good to know

from zeego.

nandorojo avatar nandorojo commented on September 17, 2024

@sidorchukandrew you can now pass __unsafeIosProps to Zeego's ContextMenu to test this. It'll forward props down

from zeego.

sidorchukandrew avatar sidorchukandrew commented on September 17, 2024

I'll get that tested shortly!

from zeego.

sidorchukandrew avatar sidorchukandrew commented on September 17, 2024

@nandorojo Is there a new release I should install?

from zeego.

peterferguson avatar peterferguson commented on September 17, 2024

Just tried this

<ContextMenu.Root __unsafeIosProps={{ shouldPreventLongPressGestureFromPropagating: true }}>

but is still crashing for me on [email protected] & [email protected]

from zeego.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.