File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -478,18 +478,18 @@ define(["../notjQuery"], function ($) {
478478 }
479479
480480 onFocusOut ( event ) {
481- // Autosubmit when the user leaves the input without selecting a suggestion on manually changing the value.
482- // Only for non-instrumented mode — instrumented inputs (e.g. TermInput) handle
483- // autosubmit themselves via BaseInput.autoSubmit() with proper term data.
484- if ( ! this . instrumented && this . hasBeenManuallyChanged && this . shouldAutoSubmit ( ) ) {
485- this . hasBeenManuallyChanged = false ;
486- let input = event . target ;
487- setTimeout ( ( ) => {
488- $ ( input . form ) . trigger ( 'submit' , { submittedBy : input } ) ;
489- } , 250 ) ;
490- }
491-
492481 if ( this . completedInput === null ) {
482+ // Autosubmit when the user leaves the input without selecting a suggestion on manually changing the value.
483+ // Only for non-instrumented mode — instrumented inputs (e.g. TermInput) handle
484+ // autosubmit themselves via BaseInput.autoSubmit() with proper term data.
485+ if ( ! this . instrumented && this . hasBeenManuallyChanged && this . shouldAutoSubmit ( ) ) {
486+ this . hasBeenManuallyChanged = false ;
487+ let input = event . target ;
488+ setTimeout ( ( ) => {
489+ $ ( input . form ) . trigger ( 'submit' , { submittedBy : input } ) ;
490+ } , 250 ) ;
491+ }
492+
493493 // If there are multiple instances of Completer bound to the same suggestion container
494494 // all of them try to handle the event. Though, only one of them is responsible and
495495 // that's the one which has a completed input set.
You can’t perform that action at this time.
0 commit comments