Disable autocorrect in search boxes

Signed-off-by: Ghalid <24234921+Ghalid@users.noreply.github.com>
This commit is contained in:
Ghalid
2019-12-21 12:06:48 -05:00
parent c720cce675
commit 40d7e1498e
4 changed files with 33 additions and 0 deletions

View File

@@ -170,4 +170,12 @@ $(document).ready(function() {
"defaultContent": ""
} ]
});
// Disable autocorrect in the search box
const inputs = document.querySelectorAll('input[type=search]');
inputs.forEach(input => {
input.setAttribute('autocomplete', 'off')
input.setAttribute('autocorrect', 'off')
input.setAttribute('autocapitalize', 'off')
input.setAttribute('spellcheck', false)
})
} );