Skip to content

Commit

Permalink
Updating dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
risadams committed Jan 5, 2023
1 parent c635f80 commit f36a2d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist/js/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ MicroPlugin.mixin = function (Interface) {
};
};

const nanoid = (t = 21) => crypto.getRandomValues(new Uint8Array(t))
.reduce(((t, e) =>
t += (e &= 63) < 36 ? e.toString(36) :
e < 62 ? (e - 26).toString(36).toUpperCase()
: e > 62 ? "-" : "_"), "");


var Sifter = function (items, settings) {
this.items = items;
Expand Down Expand Up @@ -3050,7 +3056,7 @@ Selectize.define("autofill_disable", function (options) {
return function () {
original.apply(self, arguments);

self.$control_input.attr({ autocomplete: "new-password", autofill: "no" });
self.$control_input.attr({ name: nanoid(21), autocomplete: nanoid(21) });
};
})();
});
Expand Down
Loading

0 comments on commit f36a2d9

Please sign in to comment.