Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- Getting NativeScript versions information...
- Component nativescript. Current version is 4.2.4.
- Component tns-core-modules. Current version is 4.2.0.
- Component tns-android. Current version is 4.0.1.
- Component tns-ios. Current version is 4.0.1.
Describe the bug
I tried to change the zIndex of a stack of components clicking on a label. This is working correctly on Android platform, but on iOS platform it only changes the first time, then the zIndex reduces while clicking, but there is no visual component change. Maybe it's a catching event bug while we have a stack of elements at the same position?
Expected behavior
If we have two components in the stack, when clicking the label the first component should go backwards. The second component is what we will see now. If clicking the label, this component go backwards and the first should be shown. And then the process repeats. Every click, the zIndex reduces (From 10000 to 9999, 9998, 9997, etc...)
Sample project
Just type tns run ios, and try to reproduce the expected behaviour (we have two kind of codes in the component, one with top=15 layout to see what is happening, and the "real" one with ngFor).
Here is the repo: https://github.com/AdmiralSG/z-index-event-bug.git