Prevent form submit when any combobox-dropdown is open (fixes #1236)

This commit is contained in:
Bernd Bestel
2020-12-31 13:45:14 +01:00
parent 1e27f6c127
commit 1459f8c441
26 changed files with 150 additions and 0 deletions

View File

@@ -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;