Created
August 14, 2019 11:26
-
-
Save NickIliev/c290bed8552148d17555add0fde2661d to your computer and use it in GitHub Desktop.
Event propagation (bubbling) in NativeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<GridLayout id="outmost" margin="10" backgroundColor="orangered" tap="onTap" > | |
<GridLayout id="middle" margin="50" backgroundColor="lightgray" tap="onTap"> | |
<GridLayout id="inner" margin="50" backgroundColor="blue" tap="onTap"> <!-- The StackLayout will propagete the tap gesture to its parents --> | |
<Button text="Button" id="my-button" width="100" height="200" tap="onTap" backgroundColor="whitesmoke" /> <!-- The Button has its own tap logic and won't propagate the tap event --> | |
</GridLayout> | |
</GridLayout> | |
</GridLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment