Chrome ignores autocomplete=“off”

后端 未结 30 1504
礼貌的吻别
礼貌的吻别 2020-11-22 00:42

I\'ve created a web application which uses a tagbox drop down. This works great in all browsers except Chrome browser (Version 21.0.1180.89).

Despite both the

30条回答
  •  借酒劲吻你
    2020-11-22 01:02

    I just updated to Chrome 49 and Diogo Cid's solution doesn't work anymore.

    I made a different workaround hiding and removing the fields at run-time after the page is loaded.

    Chrome now ignores the original workaround applying the credentials to the first displayed type="password" field and its previous type="text" field, so I have hidden both fields using CSS visibility: hidden;

    
    
    .chromeHack-autocomplete { height: 0px !important; width: 0px !important; opacity: 0 !important; padding: 0 !important; margin: 0 !important; } jQuery(window).load(function() { $(".chromeHack-autocomplete").delay(100).hide(0, function() { $(this).remove(); }); });

    I know that it may seem not very elegant but it works.

提交回复
热议问题