From e6840fdc373046d8f86de6a5217b973446906126 Mon Sep 17 00:00:00 2001 From: Yoni Jah Date: Sun, 15 Sep 2013 10:25:35 +0300 Subject: [PATCH] dropdown repostion fix when previous postion changes container position --- select2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 8345f134..f4881102 100644 --- a/select2.js +++ b/select2.js @@ -1130,7 +1130,7 @@ the specific language governing permissions and limitations under the Apache Lic // abstract positionDropdown: function() { - var $dropdown = this.dropdown, + var $dropdown = this.dropdown.hide(), offset = this.container.offset(), height = this.container.outerHeight(false), width = this.container.outerWidth(false), @@ -1149,6 +1149,8 @@ the specific language governing permissions and limitations under the Apache Lic css, resultsListNode; + $dropdown.show(); + if (this.opts.dropdownAutoWidth) { resultsListNode = $('.select2-results', $dropdown)[0]; $dropdown.addClass('select2-drop-auto-width');