-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Environment
- CLI: 5.0.1
- Cross-platform modules: 5.0.3
- Android Runtime: 5.0.0
- iOS Runtime: 5.0.0
Describe the bug
Tap events are being propagated to parent objects, even when isPassThroughParentEnabled = false;
To Reproduce
Add nested tap events to the objects, a Label with a tap inside a StackLayout with another tap is enough, the StackLayout event will be fired even when the touch is on the Label.
<ScrollView tap="test">
<StackLayout tap="test">
<Label text="Touch this label" tap="test" textWrap="true"/>
</StackLayout>
</ScrollView>
export function test(args: EventData) {
(<any>args.object).isPassThroughParentEnabled = false; // This seems to be ignored
console.log("Touch on " + args.object);
}
Expected behavior
Taps not being propagated when isPassThroughParentEnabled is set to false.
Sample project
https://play.nativescript.org/?template=play-tsc&id=pj7FjN
Tap the label and see a log for each element.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
mohammadrafigh and manojdcoder