MintyMods / MintySensorServer

MSS (Minty's Sensor Server) - PC Sensors Recorded & Delivered
https://www.mintymods.info
GNU General Public License v3.0
7 stars 0 forks source link

Svelte-Grid default z-index applied to grid-items causing content to be displayed above dialog content #137

Open MintyMods opened 5 years ago

MintyMods commented 5 years ago

Issue raised against Svelte-Grid

MintyMods commented 5 years ago

Added hopefully a temp workaround until the issue is possibly resolved by Svelte internals or by the luck of the Irish

  $: if (dialog) {
    fixDialogIssueWithSvelteGrid();
  }

  function fixDialogIssueWithSvelteGrid() {
    const dialog = new MDCDialog(document.querySelector(".mdc-dialog"));
    dialog.listen("MDCDialog:opened", () => {
      var newParent = document.getElementById("body");
      var oldParent = document.getElementById("dialog-fix-wrapper");
      while (oldParent.childNodes.length > 0) {
        newParent.appendChild(oldParent.childNodes[0]);
      }
    });
  }
MintyMods commented 5 years ago

Visual artifacts when moving the dialog - i.e. you can see the grid layout prior to it being moved behind which looks janky