mirror of
https://github.com/grocy/grocy.git
synced 2025-08-16 02:34:44 +00:00
Prevent form submit when any combobox-dropdown is open (fixes #1236)
This commit is contained in:
@@ -394,6 +394,11 @@ $('#save-add-recipe-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
if ($(".combobox-menu-visible").length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.getElementById("add-recipe-form").checkValidity() === false) //There is at least one validation error
|
||||
{
|
||||
return false;
|
||||
@@ -431,6 +436,11 @@ $('#save-add-note-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
if ($(".combobox-menu-visible").length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.getElementById("add-note-form").checkValidity() === false) //There is at least one validation error
|
||||
{
|
||||
return false;
|
||||
@@ -472,6 +482,11 @@ $('#save-add-product-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
if ($(".combobox-menu-visible").length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.getElementById("add-product-form").checkValidity() === false) //There is at least one validation error
|
||||
{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user