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.

Stop event propagation in NativeScript ios tap event

See original GitHub issue

I have a tap event in my code. Its parent(not an immediate parent) also has tap event. In Android, everything works fine. But in ios, the event is propagating upwards to that parent. How to stop that event propagation (such as event.stopPropagation() in javascript).

Sample XML code:

<StackLayout  tap="newsDetails" data-args="{{ $value }}">
     <StackLayout orientation="horizontal" >
         <Label text="Share" class="icon" tap="shareNews" data-args="{{ $value }}"/>
     </StackLayout>
</StackLayout>

Note: I am using NativeScript core

Please help me find the solution.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
NickIlievcommented, Sep 25, 2017

This question is answered here.

please use this repository for posting issues, bugs, and feature request. For how-to related question use the community channels like https://discourse.nativescript.org/

0reactions
lock[bot]commented, Aug 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NativeScript Event Bubbling (a short story of propagating Tap)
Imagine that we want to disable the button interaction on some occasions (e.g., inactive option). In the same time, we want to trigger...
Read more >
Stop event propagation in NativeScript ios tap event
I have a tap event in my code. Its parent(not an immediate parent) also has tap event. In Android, everything works fine. But...
Read more >
Event Bubbling and Gestures in NativeScript | Tutorial
In this NativeScript tutorial, I show a few gotchas when it comes to event bubbling and specifically nested view gesture handling.
Read more >
Stop event propagation Nativescript (vue) - DEV Community ‍ ‍
A hack to implement stop event propagation. Tagged with nativescript, nativescriptvue, vue, snippet.
Read more >
Events - NativeScript Docs
To prevent these memory leaks, it is a good practice to remove your event listener handler before releasing the listener object. Unfortunately, sometimes...
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 Hashnode Post

No results found