File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ export const VMenu = genericComponent<OverlaySlots>()({
126
126
await nextTick ( )
127
127
128
128
if (
129
- ! focusTrapSuppressed &&
130
129
isActive . value &&
131
130
before !== after &&
132
131
overlay . value ?. contentEl &&
@@ -137,10 +136,14 @@ export const VMenu = genericComponent<OverlaySlots>()({
137
136
// It isn't inside the menu body
138
137
! overlay . value . contentEl . contains ( after )
139
138
) {
140
- const focusable = focusableChildren ( overlay . value . contentEl )
141
- focusable [ 0 ] ?. focus ( )
139
+ if ( focusTrapSuppressed ) {
140
+ isActive . value = false
141
+ } else {
142
+ const focusable = focusableChildren ( overlay . value . contentEl )
143
+ focusable [ 0 ] ?. focus ( )
142
144
143
- document . removeEventListener ( 'pointerdown' , onPointerdown )
145
+ document . removeEventListener ( 'pointerdown' , onPointerdown )
146
+ }
144
147
}
145
148
}
146
149
You can’t perform that action at this time.
0 commit comments