loader.js: Disable inputs in forms not having role `search`

Previously only the `#search` input wasn't disabled, now also
the new filter input isn't. This is required to re-focus the
input after submission as disabled elements loose focus.
This commit is contained in:
Johannes Meyer 2020-07-28 10:11:39 +02:00
parent 3c41c14653
commit 4019522da1
1 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@
// Disable all form controls to prevent resubmission except for our search input // Disable all form controls to prevent resubmission except for our search input
// Note that disabled form inputs will not be enabled via JavaScript again // Note that disabled form inputs will not be enabled via JavaScript again
if ($target.attr('id') === $form.closest('.container').attr('id')) { if (! $form.is('[role="search"]') && $target.attr('id') === $form.closest('.container').attr('id')) {
$form.find(':input:not(#search):not(:disabled)').prop('disabled', true); $form.find('input:not(:disabled)').prop('disabled', true);
} }
// Show a spinner depending on how the form is being submitted // Show a spinner depending on how the form is being submitted