Skip to content
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

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

Open
MintyMods opened this issue Oct 12, 2019 · 3 comments
Labels
BUG Something isn't working Client-Side Front end browser side External Dependency

Comments

@MintyMods
Copy link
Owner

No description provided.

@MintyMods MintyMods added BUG Something isn't working Client-Side Front end browser side External Dependency labels Oct 12, 2019
@MintyMods
Copy link
Owner Author

Issue raised against Svelte-Grid

@MintyMods
Copy link
Owner Author

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working Client-Side Front end browser side External Dependency
Projects
None yet
Development

No branches or pull requests

1 participant