From 05caa04966694a18ef2444ecda35e6a1e6f2a6e2 Mon Sep 17 00:00:00 2001 From: xiaoming Date: Sat, 22 Jul 2023 17:02:45 +0800 Subject: [PATCH] fix(components): [select] fix for confusing click behaviour (#13664) fix(components): [select] fix for confusing click behaviour (#13642) --- packages/components/select/src/useSelect.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index 902ce400e0..d583bbd356 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -805,9 +805,12 @@ export const useSelect = (props, states: States, ctx) => { const handleBlur = (event: FocusEvent) => { setTimeout(() => { - // validate current focus event is inside el-tooltip-content + // validate current focus event is inside el-tooltip-content or el-select // if so, ignore the blur event and the next focus event - if (tooltipRef.value?.isFocusInsideContent()) { + if ( + tooltipRef.value?.isFocusInsideContent() || + selectWrapper.value?.contains(event.relatedTarget) + ) { ignoreFocusEvent = true return }