From 4ef46a4b1d30451832c043a1a16d3b1536d556a1 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 28 Jan 2019 11:15:59 -0500 Subject: [PATCH] Fix issue where Chrome would attempt to autofill fields (close #5818) --- modules/util/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/util/util.js b/modules/util/util.js index 887383502..babfdf6aa 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -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');