Skip to content

Commit 528b920

Browse files
authored
fix(Select): remove highlight after leaving SelectContent (#2091)
1 parent 0e6d88b commit 528b920

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/core/src/Select/SelectContentImpl.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,12 @@ provideSelectContentContext({
301301
:id="rootContext.contentId"
302302
:ref="
303303
(vnode: ComponentPublicInstance) => {
304-
content = unrefElement(vnode) as HTMLElement
304+
const el = unrefElement(vnode) as HTMLElement | undefined
305+
// special case for PopperContent
306+
if (el?.hasAttribute('data-reka-popper-content-wrapper'))
307+
content = el.firstElementChild as HTMLElement
308+
else
309+
content = el
305310
return undefined
306311
}
307312
"

0 commit comments

Comments
 (0)