I have one field in HTML. When I have it focused and hit enter key, page reload. I really don't know why. It is not inside a forms tag - I can't use form tags ....
I use AngularJS.
HTML:
<div class="search-input">
<input type="text" ng-model="q.searchPhrase" id="menu-search-input" placeholder="Search expression ..." />
</div>
<div class="search-submit">
<button ng-click="search()" type="button">Search</button>
</div>
EDIT 1:
search() function is not important, because it is fired on click event and it works as I except, when I click the Search button.
Tag button submits a form, when it has attribute "submit", I think. However, I use a div instead a button tag, but it still reloading the page in text input when I hit enter.
EDIT 2:
Search function is not important - inside is only a console.log();
search
function ? – korteeesearch()
. – Ajay Verma