Skip to content

Tap events propagating when isPassThroughParentEnabled = false; #6606

Description

@mukaschultze

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions