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:
parent
3c41c14653
commit
4019522da1
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue