Comments (3)
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.
Hey @eridanurce, few reasons:
- 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)
- To be more similar to what the native
<dialog>
element does. There's no stop propagation for the closing of a modal in theEscape
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>
- 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
- 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.
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)
- [Bug]: Fluent UI Spin Button Styling HOT 1
- [Feature]: Allow Dropdown and ComboBox Option value attribute to be number as well
- [Bug]: Datepicker has a weird behavior when Home / End buttons are clicked HOT 2
- [Bug]: Automatic scrolling problem with options in a dropdown.
- [Bug]: Cannot tab navigate back past disabled dropdown HOT 1
- [Bug]: When using custom anchor, clicking on menu trigger when menu is opened doesn't close the menu HOT 1
- [Bug]: Vitest + React + FluentUI test of Button component fails while rendering HOT 8
- Docs: Invalid HTML in Codepen for TreeView
- Empty data array in VerticalStackedBarChart throws runtime error
- [Bug]: After zoom out/zoom in multiple times, the selection will change to default in dialog
- [Bug]: Module parse failed: Unexpected character '' (1:4) HOT 1
- V9 Dialog can't trigger actions AFTER transition end
- [Bug]: Vertical scrollbar appears occasionally when Spinner is the only element in an `overflow: auto` container HOT 1
- [Feature]: Enable TagPicker to add new Tags HOT 2
- [Feature]: Add Range Slider Option in V9 react-slider
- [Bug]: Keyboard focus is moving out of the modal popup HOT 2
- [Bug]: Non modal dialog does not return focus to DialogTrigger on close
- [Feature]: Add `.js` file extension to built output to improve native ESM support HOT 4
- [Bug]: Panels of type smallFixedNear are much smaller than type smallFixedFar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentui.