GithubHelp home page GithubHelp logo

Comments (3)

eridanurce avatar eridanurce commented on May 28, 2024

This seems to be the root cause for the event being propagated: #29262
@bsunderhus can you provide some insight into why this change was made?

from fluentui.

bsunderhus avatar bsunderhus commented on May 28, 2024

Hey @eridanurce, few reasons:

  1. Stopping propagation of events might be problematic on the design system level, as we're assuming too much of how an application might consume the event.
    • it is quite simple to prevent the event on user side to avoid conflicting behaviour. Meanwhile if we stop propagation we're basically denying an event for the user, which might be cumbersome on some edge cases scenarios (there are some application level tools that consume keypress/click events from the body and then process what's happening based on that)
  2. To be more similar to what the native <dialog> element does. There's no stop propagation for the closing of a modal in the Escape press. Preventing the event is enough to stop the modal from closing, here's an example
    • By following the same pattern as dialog does we bridge for a more future proof solution where one day (🙏) we might be able to use native <dialog>
  3. The not official popover attribute also would work similar to what a native <dialog> does.

Note: I'm aware that a popover and a dialog are not equivalent, but the native <dialog> element is the closest we have on a native level to build a popover/modal

from fluentui.

microsoft-github-policy-service avatar microsoft-github-policy-service commented on May 28, 2024

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!

from fluentui.

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.