Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

The 'isPassThroughParentEnabled' property doesn't seem to work as intended #1893

Open
AdrianSima opened this issue Jul 2, 2020 · 0 comments

Comments

@AdrianSima
Copy link

Make sure to check the existing issues in this repository

Please, tell us what's the problem?

[ ] A typo
[x] Wrong documentation
[ ] Improvement of existing article
[ ] Missing documentation
[ ] New article needed

Please, tell us more details

isPassThroughParentEnabled - Gets or sets a value indicating whether touch events should pass through to a parent view of the layout container in case an interactive child view did not handle the event. Does not affect the appearance of the view. The default value is false

What I understand is that if I set the property to false, the event should not be passed on to the parents if it has been handled in one of the children, but this is not happening like this in the Playground example provided on the documentation page:
https://play.nativescript.org/?template=play-tsc&id=6c9GA0

There is this function:

export function onTap(args) {
    let button = args.object;
    button.text = ++count;
    console.log("On button tap triggered (but onWrapLayoutTapped won't trigger)");
}

The message in the log clearly says the onWrapLayoutTapped should not trigger, but it does, no matter what value I put in the isPassThroughParentEnabled property of the middle container.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant