Product lookup enter refresh page


I have found a problem, here is how to replicate it:

  • add a few products to a quote using the new row button.
  • do not save the quote.
  • add a new product using the add product button
  • on the search bar put some text and hit enter.

The whole page is refresh so all the previous items are lost.

I tried to modify the iQuery on the modal_product_lookups.php by adding

$(document).keypress(function(e) {
    if(e.which == 13) { 

But after a while I notice the enter key is also recorded on the quotes/views/view.php file so I have no idea how can I fix that any hints will be greatly appreciated.