1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add some more trap form elements to workaround Chrome autofill

This commit is contained in:
Nick O'Leary 2020-05-21 10:21:18 +01:00
parent 977fef03b0
commit 57f0fbbb98
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -592,6 +592,7 @@ RED.editor = (function() {
// - the elements need to have id's that imply password/username // - the elements need to have id's that imply password/username
$('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-password" type="password"/></span>').prependTo(dialogForm); $('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-password" type="password"/></span>').prependTo(dialogForm);
$('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-username" type="text"/></span>').prependTo(dialogForm); $('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-username" type="text"/></span>').prependTo(dialogForm);
$('<span style="position: absolute; top: -2000px;"><input id="red-ui-trap-user" type="text"/></span>').prependTo(dialogForm);
dialogForm.on("submit", function(e) { e.preventDefault();}); dialogForm.on("submit", function(e) { e.preventDefault();});
dialogForm.find('input').attr("autocomplete","off"); dialogForm.find('input').attr("autocomplete","off");
return dialogForm; return dialogForm;