I have read about 10-15 different similar stackoverflow questions but none seems to do it for me so I figured I'll get my issue out there.
I have this html:
<form>
<input type="search"/>
</form>
Which creates a textarea, if I then click inside of this textarea and type something (don't need to) and then clicks enter the form (with textarea) dissapears on the second attempt I click enter everytime.
Same goes if I use type="submit"
.
What happends is that page reloads and then form is gone. Note that I need to have the type as search and cant change it to anything else.
I've tried the preventdefault()
in the javascript trying to deny page reload without any further success.
How do I make to it so that the form doesn't dissapear when clicking enter?