From 14f6788ab995d3b1faf65e2db758eb141ce66d1e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 14 Jun 2019 11:17:49 +0100 Subject: [PATCH] Set autocomplete to disabled in form input elements --- .../@node-red/editor-client/src/js/ui/common/typedInput.js | 2 +- .../node_modules/@node-red/editor-client/src/js/ui/editor.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index 4d1f4b038..281785236 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -209,7 +209,7 @@ that.input.css("margin"+d,0); }); - ["type","placeholder"].forEach(function(d) { + ["type","placeholder","autocomplete"].forEach(function(d) { var m = that.element.attr(d); that.input.attr(d,m); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index d55161adc..a50545dcb 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -567,13 +567,13 @@ RED.editor = (function() { type: "text", style: "margin-left: 5px; width: calc(40% - 8px)", placeholder: RED._("common.label.name") - }).appendTo(row).val(opt.name); + }).attr("autocomplete","disable").appendTo(row).val(opt.name); } var valueField = $('',{ class: "node-input-env-value", type: "text", style: "margin-left: 5px; width: calc(60% - 8px)" - }).appendTo(row) + }).attr("autocomplete","disable").appendTo(row) valueField.typedInput({default:'str', types:['str','num','bool','json','bin','env'] @@ -721,6 +721,7 @@ RED.editor = (function() { $('').prependTo(dialogForm); $('').prependTo(dialogForm); dialogForm.on("submit", function(e) { e.preventDefault();}); + dialogForm.find('input').attr("autocomplete","disable"); return dialogForm; }