diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-20 09:40:01 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-20 09:40:01 +0200 |
commit | 37d1cc65466e63cb7ac7e8245c290e60b11804c6 (patch) | |
tree | 4c6129246a5902edc252b872ecf280a1d5c1fb30 /server/sonar-web/src/main/js/libs | |
parent | 5ad6fee42b1b74f36c3df201fe37d14c969dec44 (diff) | |
download | sonarqube-37d1cc65466e63cb7ac7e8245c290e60b11804c6.tar.gz sonarqube-37d1cc65466e63cb7ac7e8245c290e60b11804c6.zip |
fix select2 closing problem in the facet sidebar
Diffstat (limited to 'server/sonar-web/src/main/js/libs')
-rw-r--r-- | server/sonar-web/src/main/js/libs/third-party/select2.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/libs/third-party/select2.js b/server/sonar-web/src/main/js/libs/third-party/select2.js index 213f4cf930a..8975c0ea4c2 100644 --- a/server/sonar-web/src/main/js/libs/third-party/select2.js +++ b/server/sonar-web/src/main/js/libs/third-party/select2.js @@ -962,15 +962,17 @@ var cid = this.containerId, selector = this.containerSelector, scroll = "scroll." + cid, resize = "resize." + cid; - this.container.parents().each(function() { - $(this).bind(scroll, function() { - var s2 = $(selector); - if (s2.length == 0) { - $(this).unbind(scroll); - } - s2.select2("close"); + setTimeout(function () { + this.container.parents().each(function() { + $(this).bind(scroll, function() { + var s2 = $(selector); + if (s2.length == 0) { + $(this).unbind(scroll); + } + s2.select2("close"); + }); }); - }); + }.bind(this), 100); $(window).bind(resize, function() { var s2 = $(selector); @@ -1401,6 +1403,7 @@ // single close: function () { if (!this.opened()) return; + console.log('closing...'); this.parent.close.apply(this, arguments); this.dropdown.removeAttr("style").addClass("select2-offscreen").insertAfter(this.selection).show(); }, |