-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ForeignObject onPress() event not firing #1389
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open. |
Hey, could anyone take a look at this issue? |
I think it is a bug I have the same issue |
I also have this issue - any updates or workarounds? |
Any Updates? |
Same problem here, any updates? |
Same issue here. |
Add a dummy
(you must specify a width & a height for your Rect) |
Add a dummy Rect not working on IOS |
Same issue |
Part of this idea was a workaround for me. I put an onPressIn in the transparent Rect that was OUTSIDE of the ForeignObject component. It acted like an invisible touch zone on the thing I wanted to display in the ForeignObject.
|
it works for me! |
This worked for me too. Keeping the rect outside the foreingObject did the job, I was keeping it inside and it was breaking in iOS. |
Bug
I created a line chart with each line being stored in a
<G>
container together with a label inside a<ForeignObject>
(due to styling options). The code for one such plotted line looks like this:The label should be interactive, as it should open a
<Modal>
when pressed. Therefore, I wrapped the<Text>
with aTouchableOpacity>
component and added anonPress()
event to it.However, this event is not triggered inside the
<ForeignObject>
(also when adding the event to the<ForeignObject>
itself). But it does fire if I add theonPress()
event to the<G>
or<Path>
component. I am wondering what may cause this.Expectation:
onPress()
event should be triggered in a<ForeignObject>
or nested<TouchableOpacity>
Environment info
Related Issue
#580
The text was updated successfully, but these errors were encountered: