Read the statement by Michael Teeuw here.
zIndex configs interfere with SOME other modules
-
zIndex config option is not applied — containers always render at
z-index: 9999Description
The README documents a
zIndexfield per module entry (and references it in the Troubleshooting section: “Adjust zIndex in your module config”), but setting it has no effect. Positioned containers are always rendered withz-index: 9999regardless of the configured value.Steps to reproduce
- Configure a module with an explicit
zIndex:{ module: "MMM-GlobalPositioner", config: { debug: false, delay: 1000, maxAttempts: 5, modules: [ { name: "MMM-GoogleSheets", position: { top: 160, left: 20 }, zIndex: 1 } ] } } - Restart MagicMirror.
- Inspect the generated container in DevTools.
Expected behavior
The container’s inline style should reflect
z-index: 1.Actual behavior
The container is still rendered with
z-index: 9999, e.g.:<div id="mm-global-container-MMM-GoogleSheets" style="position: fixed; z-index: 9999; pointer-events: none; left: 20px; top: 160px;">Impact
This makes it impossible to layer GlobalPositioner-managed modules underneath other overlay-based modules — for example, screen-dimming modules like
MMM-AutoDimmer/MMM-Dimmer, which apply opacity via afullscreen_aboveoverlay. Because GlobalPositioner’s containers are hardcoded toz-index: 9999, modules repositioned by it always render above such overlays and never get dimmed, even though dimming works correctly for all normally-positioned modules.Workaround
Forcing the z-index via a custom stylesheet (
config/custom.css) with!important, since the module sets it as an inline style:div[id^="mm-global-container-"] { z-index: 1 !important; }This resolves the visual conflict, but it would be better if the documented
zIndexconfig option actually worked, so this kind of override isn’t necessary.Environment
- MagicMirror²: v2.36.0 (commit
fb41d24ef522e91e802e2a623ff6afbddeb3c9d8) - Node.js: v22.21.1
- OS: Raspberry Pi OS
Otherwise, GREAT module!
Karl - Configure a module with an explicit
-
@amanzimdwini typically you would open an issue on the module GitHub page to engage the author. As most dont visit the forum regularly
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login