Enter Key + Search

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hello,

I could not find anywhere the code that implements the behavior of [focus in a TextBox] + [Enter key] = [Redirection to Search Page].
Any hints about how to disable/edit it?

Thanks
13 years ago
1. Open \Modules\SearchBox.ascx.cs file
2. Remove OnPreRender() method
13 years ago
Hi, I have the same problem. Any page when I click the "enter" key, it will redirect to the search page. And Ihave tried to remove the OnPreRender() method in  \Modules\SearchBox.ascx.cs file, but it seems that the problem still exists. Can someone tell me why?
12 years ago
Hi!

Problem is that almost entire page in nopCommerce is a single form. Since the default button is nowhere set, enter "clicks" the first button on the page, and it is in most cases the "Search" button.
To repair this, you have to set default buttons. Surround your form with a panel and set DefaultButton property of the panel to the button you wish to be clicked when user hits enter.

Hope this helps.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.