safari #text_search

Hello Team,

In safari browser, when we place the cursor in #text_search and click on Enter, the page is getting refreshed.This issue exists only in safari browser.
Can anyone tell me how we can avoid the refresh in the above scenario,

Thanks in Advance,
Dumpa

It seems that you have a html form, surrounding grid, and on pressing enter key that form is submitted.

You can add something like next

dhtmlxEvent(mygrid.entBox, "keypress", function(e){ e = e || event; if (e.keyCode == 13){ e.cancelBubble=true; return false; } });

It must block enter key bubbling, so form auto-submit will not be triggered.

It is not working.
Even if we keep this code and click on enter, web page is getting refreshed.
Any other solution would you suggest ?

Thanks
Dumpa

Try to update above code a bit

dhtmlxEvent(mygrid.entBox, "keypress", function(e){ e = e || event; if (e.keyCode == 13){ if (e.preventDefault) e.preventDefault(); e.cancelBubble=true; return false; }

one more line added, which must force blocking ( was tested locally )