-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad zSorting when zIndex is the same #443
Comments
Hi @jorge-graca-sky, do you have any reproduction code/steps that consistently cause the "random pop" issue? If it helps we have a playground now where you can easily build examples and share them with a link: https://lightningjs.io/playground/ |
Hi @frank-weindel, thanks for the quick reply! Here is the requested playground example:
|
Hi @frank-weindel, is the example understandable? Anything else I could help? |
@uguraslan is this fixed - I think the bug needs to be closed |
@chiefcll I don't think this bug was ever addressed. Perhaps we should elevate it? |
@jorge-graca-sky suggested PR #441 as a fix, we need to review the suggested fix. |
Hi, I have been investigating why some Elements randomly pop in front of other in our app. This has revealed a bug in the lightning’s zSorting algorithm, it does not sort Elements with the same zIndex by updateTreeOrder.
The issue is on sortZIndexedChildren of ElementCore, on lines 2062 “// Merge-sort arrays;” it assumes both arrays are sorted, however same zIndex items may not be (since _updateTreeOrder change does not trigger _zIndexResort = true the a array may have unsorted items)
The logic that ensured this was removed on version 1.0.4: performance(updateTreeOrder): refactor, make simpler and (in most cas… · rdkcentral/Lightning@38285e0 · GitHub
My suggestion of fix:
#441
The text was updated successfully, but these errors were encountered: