1
0
mirror of synced 2024-11-26 23:06:02 +03:00

Merge pull request #1722 from yonjah/master

dropdown repostion fix when previous postion changes container position
This commit is contained in:
Igor Vaynberg 2013-09-17 07:22:48 -07:00
commit 9e7dde66b7

View File

@ -1130,7 +1130,7 @@ the specific language governing permissions and limitations under the Apache Lic
// abstract // abstract
positionDropdown: function() { positionDropdown: function() {
var $dropdown = this.dropdown, var $dropdown = this.dropdown.hide(),
offset = this.container.offset(), offset = this.container.offset(),
height = this.container.outerHeight(false), height = this.container.outerHeight(false),
width = this.container.outerWidth(false), width = this.container.outerWidth(false),
@ -1149,6 +1149,8 @@ the specific language governing permissions and limitations under the Apache Lic
css, css,
resultsListNode; resultsListNode;
$dropdown.show();
if (this.opts.dropdownAutoWidth) { if (this.opts.dropdownAutoWidth) {
resultsListNode = $('.select2-results', $dropdown)[0]; resultsListNode = $('.select2-results', $dropdown)[0];
$dropdown.addClass('select2-drop-auto-width'); $dropdown.addClass('select2-drop-auto-width');