Content pfp
Content
@
0 reply
0 recast
0 reaction

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
In need of some FE help. I'm using the Select component from shadcn (radix underneath). When expanded, it renders above content on the page. On mobile, when I tap on any select item after expanding it, the tap propagates to the content underneath it. I tried prevent propagation with an onClick on the item and parent.
2 replies
0 recast
13 reactions

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Radix UI comes with its own focus-trapping behavior so the usual event modifiers likely won’t work. Make sure the anatomy matches the example in the docs and check for unexpected stacking contexts in parents (`position: absolute`, `overflow`, etc.) https://www.radix-ui.com/primitives/docs/components/select#anatomy
1 reply
0 recast
1 reaction

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
Thanks! I'm using shadcn so it is setting the anatomy which I double checked and matches the radix docs. Also checked the parents and none have position set or overflow set... 😔
1 reply
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Perhaps it’s something more obscure? https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context
1 reply
0 recast
1 reaction

Gabriel Ayuso pfp
Gabriel Ayuso
@gabrielayuso.eth
Thx! I decided to switch to HTML <select> tag for now. Already wasted too much time trying to figure it out and can do without it for now
1 reply
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
👌
0 reply
0 recast
0 reaction