Fix issue where Chrome would attempt to autofill fields (close #5818)

This commit is contained in:
Quincy Morgan
2019-01-28 11:15:59 -05:00
parent 3903e9347e
commit 4ef46a4b1d
+2 -1
View File
@@ -305,7 +305,8 @@ export function utilNoAuto(selection) {
var isText = (selection.size() && selection.node().tagName.toLowerCase() === 'textarea');
return selection
.attr('autocomplete', 'off')
// assign 'new-password' even for non-password fields to prevent browsers (Chrome) ignoring 'off'
.attr('autocomplete', 'new-password')
.attr('autocorrect', 'off')
.attr('autocapitalize', 'off')
.attr('spellcheck', isText ? 'true' : 'false');