We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 64ec0c5 + 02d6f9f commit b5cceabCopy full SHA for b5cceab
1 file changed
select2.js
@@ -560,6 +560,7 @@
560
this.container = this.createContainer();
561
562
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
563
+ this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
564
this.container.attr("id", this.containerId);
565
566
// cache the body so future lookups are cheap
@@ -942,7 +943,7 @@
942
943
*/
944
// abstract
945
opening: function() {
- var cid = this.containerId, selector = "#"+ cid,
946
+ var cid = this.containerId, selector = this.containerSelector,
947
scroll = "scroll." + cid, resize = "resize." + cid;
948
949
this.container.parents().each(function() {
0 commit comments