superblocks-lab
superblocks-lab copied to clipboard
Pressing enter in some forms does submit the page
Environment/Browser
Version 1.1.0
Description
Pressing enter in some forms does submit the page, which is wrong.
Steps to reproduce
Exact steps are unknown.
Expected result
Nothing.
Actual result
Submit getting called on enter.
There are multiple form
elements in the application. Taking the ones which submit on <enter>
, the form
used in contract interaction would probably be the one mentioned here. The other elements have to do with renaming.
If that is the case, something like the following would suffice to prevent the reported behavior in contractinteraction.js
:
<form id="` +
prefix +
item.name +
`" onkeypress='return event.keyCode != 13;' action="/static/error/404.html" onsubmit="` +
. . .