Dirty fix will be to remove/change $pluginInstallSearch.on
to trigger only on submit. The changed function looks like this. Remember this is not recommended.
$pluginInstallSearchOnlyonSubmit = $(".plugin-install-php .search-form.search-plugins");
$pluginInstallSearchOnlyonSubmit.on( 'submit', _.debounce( function( event, eventtype ) {
var $searchTab = $( '.plugin-install-search' ), data, searchLocation;
data = {
_ajax_nonce: wp.updates.ajaxNonce,
s: $pluginInstallSearchOnlyonSubmit.find('.wp-filter-search').val(),//Set the search input value
tab: 'search',
type: $( '#typeselector' ).val(),
pagenow: pagenow
};
.........
Again, the above function works fine but that’s not the way to do it. It just gives an idea as how to approach it.