mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Fix double form submit when using ENTER (fixes #72)
This commit is contained in:
@@ -39,9 +39,10 @@ $('#quantityunit-form input').keydown(function(event)
|
||||
{
|
||||
if (event.keyCode === 13) //Enter
|
||||
{
|
||||
event.preventDefault();
|
||||
|
||||
if (document.getElementById('quantityunit-form').checkValidity() === false) //There is at least one validation error
|
||||
{
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user