docs-v7 icon indicating copy to clipboard operation
docs-v7 copied to clipboard

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

Open AdrianSima opened this issue 5 years ago • 0 comments

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.

AdrianSima avatar Jul 02 '20 07:07 AdrianSima