Giter Club home page Giter Club logo

Comments (4)

muratcorlu avatar muratcorlu commented on May 26, 2024

This is a known limitation of using native Dialog element because Dialog element renders on top-layer, which you can not override it via z-index values. Technically Popover API is on the way which will fix this issue, but until that time, I think we may check for a workaround for this.

Currently our dialog supports older browsers that don't support dialog element. We make that check automatically and use a polyfilled version instead with that small decision point:

  private get hasHtmlDialogSupport() {
    return !!window.HTMLDialogElement;
  }

Maybe we can consider making this a property that you can manually set outside like:

@property({ type: Boolean })
levelled = !window.HTMLDialogElement;

So, whenever a popover opens within a browser that doesn't support Popover API, dialog that is already visible can be switched to levelled variant which will convert dialog to a version that respects z-index rules. But:

  • We need to be careful about UX effects of this. If this switch causes a rerender on dialog content, that would be awful for use-cases like filling a form inside dialog, or reading a long text, since a new notification will interrupt these badly.
  • If we set this true by default in a project, then we'll miss the opportunities that native dialog element provides us and we can not easily implement in a custom dialog element, like avoiding cropped dialog because of parent style rules and keyboard navigation trap.

Please feel free to share your opinions. @Enes5519

PS: levelled name could be switched with a better option.

from baklava.

Enes5519 avatar Enes5519 commented on May 26, 2024

It is healthiest to do it this way, different ways are not ready yet, so we can pass prop in this way.

from baklava.

github-actions avatar github-actions commented on May 26, 2024

🎉 This issue has been resolved in version 2.2.0-beta.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

from baklava.

github-actions avatar github-actions commented on May 26, 2024

🎉 This issue has been resolved in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from baklava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.