Skip to content

Commit

Permalink
Only showing combobox invalid input popup if input is given
Browse files Browse the repository at this point in the history
  • Loading branch information
iccole committed Jan 8, 2025
1 parent a18d3c2 commit 38d0a75
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pn-site/js/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@
}

// Remove invalid value
this.input
.val( "" )
.attr( "title", value + " didn't match any item" )
.tooltip( "open" );
this.element.val( "" );
this._delay(function() {
this.input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
if (value) {
this.input
.val( "" )
.attr( "title", value + " didn't match any item" )
.tooltip( "open" );
this.element.val( "" );
this._delay(function() {
this.input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
}
this.input.autocomplete( "instance" ).term = "";
},

Expand Down

0 comments on commit 38d0a75

Please sign in to comment.