-
Notifications
You must be signed in to change notification settings - Fork 9
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
Make sure notifications are always on top #143
Comments
@nextcloud/designers is there a sane value for the z-index? Would there ever be anything above the toast? |
Well, we really have no global list of zindex, so it's kind of everyone is doing their own sh** 🙈 |
The other issue is that even if it has a proper z-index, it would then overlay the modal controls. So we would possibly have to move it to the left/bottom too? |
well, this is a live temporary heads up, I think it's fair to have it on top? |
Sure – we can always see for further enhancements anyway. :) |
Not sure how bad this is performance wise, but theoretically: findZIndex() {
// Get all elements
return [...document.querySelectorAll('body *')]
// use getComputedStyle to also include zIndex from stylesheets
.map(el => parseFloat(window.getComputedStyle(el).zIndex))
// Reduce to get only the highest value
.reduce((current, z) => z > current ? z : current, 1)
} |
When triggering a OC.Notification.showTemporary, I realized it is not always on top?
Expected behavior:
Notification has a higher z-index than Modal
The text was updated successfully, but these errors were encountered: