[frontend] Prevent chrome from autofilling username in select2 search inputs
@@ -199,6 +199,11 @@ ko.bindingHandlers.select2 = {
}
});
});
+ $element
+ .data('select2')
+ .search.prop('readOnly', true)
+ .attr('onfocus', 'this.removeAttribute("readonly");')
+ .wrap('<form autocomplete="off">');
},
update: function(element, valueAccessor, allBindingsAccessor) {
if (typeof allBindingsAccessor().visible != 'undefined') {
