Skip to content

Commit 9e7dde6

Browse files
committed
Merge pull request select2#1722 from yonjah/master
dropdown repostion fix when previous postion changes container position
2 parents 057cf7e + e6840fd commit 9e7dde6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

select2.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ the specific language governing permissions and limitations under the Apache Lic
11301130

11311131
// abstract
11321132
positionDropdown: function() {
1133-
var $dropdown = this.dropdown,
1133+
var $dropdown = this.dropdown.hide(),
11341134
offset = this.container.offset(),
11351135
height = this.container.outerHeight(false),
11361136
width = this.container.outerWidth(false),
@@ -1149,6 +1149,8 @@ the specific language governing permissions and limitations under the Apache Lic
11491149
css,
11501150
resultsListNode;
11511151

1152+
$dropdown.show();
1153+
11521154
if (this.opts.dropdownAutoWidth) {
11531155
resultsListNode = $('.select2-results', $dropdown)[0];
11541156
$dropdown.addClass('select2-drop-auto-width');

0 commit comments

Comments
 (0)