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

@@ -46,6 +46,14 @@ $(document).ready(function() {
$('.deleteCustomDNS').on('click', deleteCustomDNS);
}
});
// 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)
})
});
function addCustomDNS()

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)
})
} );

View File

@@ -395,4 +395,13 @@ $(document).ready(function() {
} );
$("#resetButton").click( function () { tableApi.search("").draw(); $("#resetButton").hide(); } );
// 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)
})
} );

View File

@@ -251,4 +251,12 @@ $(document).ready(function(){
{
alInfo.delay(3000).fadeOut(2000, function() { alInfo.hide(); });
}
// 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)
})
});