Skip to content

Commit 801ef48

Browse files
authored
fix: prevent menu item focus ring from exceeding popover boundaries (#7672)
* fix: prevent menu item focus ring from exceeding the boundaries of the popover * try diff css changes...
1 parent ac55911 commit 801ef48

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/@react-spectrum/s2/src/Menu.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export let menu = style({
104104
gridTemplateColumns: menuItemGrid,
105105
boxSizing: 'border-box',
106106
maxHeight: '[inherit]',
107+
width: 'full',
107108
overflow: {
108109
isPopover: 'auto'
109110
},
@@ -187,6 +188,7 @@ export let menuitem = style({
187188
},
188189
alignItems: 'baseline',
189190
minHeight: 'control',
191+
height: 'min',
190192
textDecoration: 'none',
191193
cursor: {
192194
default: 'default',

packages/@react-spectrum/s2/src/Picker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ const quietFocusLine = style({
176176
export let menu = style({
177177
outlineStyle: 'none',
178178
display: 'grid',
179+
width: 'full',
179180
gridTemplateColumns: {
180181
size: {
181182
S: [edgeToText(24), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(24)],

packages/@react-spectrum/s2/src/Popover.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ let popover = style({
7979
// Don't be larger than full screen minus 2 * containerPadding
8080
maxWidth: '[calc(100vw - 24px)]',
8181
boxSizing: 'border-box',
82+
display: 'flex',
8283
opacity: {
8384
isEntering: 0,
8485
isExiting: 0
@@ -226,7 +227,7 @@ const dialogStyle = style({
226227
borderRadius: '[inherit]',
227228
overflow: 'auto',
228229
position: 'relative',
229-
size: 'full',
230+
width: 'full',
230231
maxSize: '[inherit]'
231232
}, getAllowedOverrides({height: true}));
232233

0 commit comments

Comments
 (0)