MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    zIndex configs interfere with SOME other modules

    Scheduled Pinned Locked Moved Utilities
    2 Posts 2 Posters 25 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      amanzimdwini
      last edited by

      Re: Global module positioning

      zIndex config option is not applied — containers always render at z-index: 9999

      Description

      The README documents a zIndex field 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 with z-index: 9999 regardless of the configured value.

      Steps to reproduce

      1. 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 }
            ]
          }
        }
        
      2. Restart MagicMirror.
      3. 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 a fullscreen_above overlay. Because GlobalPositioner’s containers are hardcoded to z-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 zIndex config 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

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @amanzimdwini
        last edited by

        @amanzimdwini typically you would open an issue on the module GitHub page to engage the author. As most dont visit the forum regularly

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0

        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
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy