File tree 2 files changed +5
-10
lines changed
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -295,15 +295,6 @@ export default {
295
295
isMixMode = _s . mode == 'mix' ,
296
296
tagData = this . suggestedListItems . find ( item => ( item . value ?? item ) == value )
297
297
298
- // select mode: reset the dropdown to show all options again to the user
299
- if ( _s . mode == 'select' && ! this . state . composing && this . userInput ) {
300
- setTimeout ( ( ) => {
301
- setTimeout ( ( ) => closeOnSelect ? this . dropdown . hide ( ) : this . dropdown . show ( ) , 0 )
302
- this . DOM . scope . querySelector ( '.' + _s . classNames . tagText ) . focus ( ) //set the focus back to input on each select to ensure consistent behavior
303
- } , 0 )
304
- return ;
305
- }
306
-
307
298
// The below event must be triggered, regardless of anything else which might go wrong
308
299
this . trigger ( 'dropdown:select' , { data :tagData , elm, event} )
309
300
@@ -332,6 +323,10 @@ export default {
332
323
this . toggleFocusClass ( true )
333
324
} )
334
325
326
+ // select mode: reset the dropdown to show all options again to the user
327
+ if ( _s . mode == 'select' && ! this . state . composing && this . userInput )
328
+ setTimeout ( ( ) => this . DOM . scope . querySelector ( '.' + _s . classNames . tagText ) . focus ( ) , 0 ) //set the focus back to input on each select to ensure consistent behavior
329
+
335
330
closeOnSelect && setTimeout ( this . dropdown . hide . bind ( this ) )
336
331
337
332
// execute these tasks once a suggestion has been selected
Original file line number Diff line number Diff line change @@ -648,7 +648,7 @@ Tagify.prototype = {
648
648
this . removeTags ( tagElm )
649
649
650
650
this . trigger ( "edit:updated" , eventData )
651
- this . dropdown . hide ( )
651
+ closeOnSelect && this . dropdown . hide ( )
652
652
653
653
// check if any of the current tags which might have been marked as "duplicate" should be now un-marked
654
654
if ( this . settings . keepInvalidTags )
You can’t perform that action at this time.
0 commit comments