Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi,
I noticed some weird behaviour with dialog z-indexes when I was testing my application under chrome - they were all having their z-index set to 2147483647.
Inspecting the DOM I could see that under the body element there was a div with that as the zindex that was showing the content as "#shadow-root (closed)". After a bit of investigation I tracked that div element as coming from the PassBolt password manager extension I had installed in Chrome. I gather that sometimes browser extensions may inject a host element to have a shadow dom under, and in this case the PassBolt extension is giving the host element the highest z-index possible. getZindexPartial in popup.ts seems to scan all children of the body element to find the highest z-index of those to include in its z-index calcuations even when the parent of the popup is not the body (i.e. target is not body) and those children are not ancestors of the popup parent. There's no comment in the code visible to me so I do not know why getZindexPartial does that - it means that if an application using EJ2 popups is self-contained under a dom node that is not the body it will still get affected by the z-index of dom nodes under the body that are nothing to do with the application (including those injected by browser extensions).
Looking at the code for getZindexPartial I can see that it ignores children of the body where their z-index is 'auto' or their position is 'static'. If there is a good reason for factoring in the z-index values of children of the body even when the popup parent is not the body then changes that would stop it picking up the z-index from inject shadow dom host divs that are injected the same way as the PassBolt extension could be to do one or both of: