{"id":5587,"date":"2021-11-16T09:35:21","date_gmt":"2021-11-16T08:35:21","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=5587"},"modified":"2021-11-16T09:37:35","modified_gmt":"2021-11-16T08:37:35","slug":"chrome-prevent-autocomplete-on-input-fields","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/chrome-prevent-autocomplete-on-input-fields\/","title":{"rendered":"Chrome prevent autocomplete on input fields"},"content":{"rendered":"\n<p>Tags: Auto-complete, Auto-fill<\/p>\n\n\n\n<p>Source: <a href=\"https:\/\/stackoverflow.com\/a\/26931180\">https:\/\/stackoverflow.com\/a\/26931180<\/a><br><\/p>\n\n\n\n<p>Sometimes even <code>autocomplete=off<\/code> won&#8217;t prevent filling in credentials into wrong fields.<\/p>\n\n\n\n<p>A workaround is to disable browser autofill using readonly-mode and set writable on focus:<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"html\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\"> &lt;input type=\"password\" readonly onfocus=\"this.removeAttribute('readonly');\"\/><\/pre><\/div>\n\n\n\n<p>The <code>focus<\/code> event occurs at mouse clicks and tabbing through fields.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tags: Auto-complete, Auto-fill Source: https:\/\/stackoverflow.com\/a\/26931180 Sometimes even autocomplete=off won&#8217;t prevent filling in credentials into wrong fields. A workaround is to disable browser autofill using readonly-mode and set writable on focus: The focus event occurs at mouse clicks and tabbing through fields.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5587","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/5587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=5587"}],"version-history":[{"count":4,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/5587\/revisions"}],"predecessor-version":[{"id":5592,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/5587\/revisions\/5592"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=5587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=5587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=5587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}