File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
components/vc-select/Selector Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ interface InputProps {
3535 onCompositionend : EventHandlerNonNull ;
3636}
3737
38- const Input = defineComponent < InputProps , { VCSelectContainerEvent : any } > ( {
38+ const Input = defineComponent < InputProps , { VCSelectContainerEvent : any ; blurTimeout : any } > ( {
3939 name : 'Input' ,
4040 inheritAttrs : false ,
4141 setup ( props ) {
@@ -50,6 +50,7 @@ const Input = defineComponent<InputProps, { VCSelectContainerEvent: any }>({
5050 } ) ;
5151 }
5252 return {
53+ blurTimeout : null ,
5354 VCSelectContainerEvent : inject ( 'VCSelectContainerEvent' ) ,
5455 } ;
5556 } ,
@@ -141,10 +142,13 @@ const Input = defineComponent<InputProps, { VCSelectContainerEvent: any }>({
141142 } ,
142143 onPaste,
143144 onFocus : ( ...args : any [ ] ) => {
145+ clearTimeout ( this . blurTimeout ) ;
144146 this . VCSelectContainerEvent ?. focus ( args [ 0 ] ) ;
145147 } ,
146148 onBlur : ( ...args : any [ ] ) => {
147- this . VCSelectContainerEvent ?. blur ( args [ 0 ] ) ;
149+ this . blurTimeout = setTimeout ( ( ) => {
150+ this . VCSelectContainerEvent ?. blur ( args [ 0 ] ) ;
151+ } , 200 ) ;
148152 } ,
149153 } ,
150154 inputNode . type === 'textarea' ? { } : { type : 'search' } ,
You can’t perform that action at this time.
0 commit comments