Comments (5)
@andy-hook yes for my desired behaviour it was enough to do onPointerLeave={e => e.preventDefault()}
, I found it out by trial and error after having already opened this issue, thanks for your help.
Maybe the docs could add that behaviour or maybe it's just an edge case need not to be documented, don't know :).
thanks for the quick feedback @benoitgrelard
from primitives.
@andy-hook this seems strange to me, the docs do show the DismissableLayer
props are here on content, but I wonder if it's a mistake. Usually we hide a combination of those behind modality and don't allow direct access to those props. It seems like potentially this wasn't considered here and we just ended up documenting things as they are?
from primitives.
I don't think we've implemented the modality pattern for this component yet.
The Content should stay open when the mouse pointer leaves the Content area
Perhaps unintuitive given the current documentation but this can be achieved by preventing default inside onPointerEnter
onPointerLeave
:
https://codesandbox.io/p/sandbox/navigation-menu-on-click-duwvgn?file=%2FApp.js%3A358%2C1-360%2C1
@kuus is that the interaction you are trying to achieve?
from primitives.
I mean I'm not sure modality even makes sense for a component like this, because if the content was modal, you wouldn't be able to interact with the other items in the top-level.
So I'm inclined to say that the solution here is to hardcode those props to formalize the non-modal nature of it and thus remove those props from the docs.
from primitives.
So I'm inclined to say that the solution here is to hardcode those props to formalize the non-modal nature of it and thus remove those props from the docs.
I agree with this.
The Content should stay open when the mouse pointer leaves the Content area
Hopefully the suggested solution in my comment is still helpful for this specific need however.
from primitives.
Related Issues (20)
- Option to disable accessibility warnings for custom DOM environments
- Typeahead example? HOT 1
- [Slider] Value updating to unexpected value
- Use fieldset html for RadioGroup instead of a div
- Tooltip.Content throws error if used with asChild in React 19 HOT 1
- Keyboard accessibility issue when a group of radio buttons is the only interactive element in a Popover
- No child type of TooltipContent in tooltip component occurs in version 5.2.2 of typescript
- [ContextMenu] Context menu hover does not work if you right click into unfocused window
- [ContextMenu]: Shows multiple open sub items if you open the context menu after being focused in the developer console
- [Modal (AlertDialog, Dialog, Popover, Drawer)] - Components Not Clickable with Apple Pencil on iPad HOT 1
- Alert Dialog.
- AlertDialog
- Allow passing key to Portals HOT 3
- Have hidden `value` in `toggle-group`
- Page Scrolls to Top/Bottom on Dialog Modal Close HOT 3
- CSP issues for statically built sites
- [ContextMenu] `--radix-popper-transform-origin` only have 02 properties as `top-left` and `top-right` when window's height is higher than 511px
- Possible bug, responsiveness does not work in the tooltip
- Possible bug using radix-select with react-hook-form HOT 1
- Switch value prop defaults to "on"
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 primitives.