Skip to content

Commit 64ec0c5

Browse files
committed
Merge pull request select2#345 from Polonious/master
Predictable contain id
2 parents c65355e + 881d2fa commit 64ec0c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
this.enabled=true;
560560
this.container = this.createContainer();
561561

562-
this.containerId="s2id"+nextUid();
562+
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
563563
this.container.attr("id", this.containerId);
564564

565565
// cache the body so future lookups are cheap

0 commit comments

Comments
 (0)