Skip to content

Commit cb7f1da

Browse files
committed
Merge branch 'master' of git://github.com/ivaynberg/select2
2 parents 9ecce5a + 071d6c7 commit cb7f1da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

select2.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@
352352
this.id=opts.id;
353353

354354
// destroy if called on an existing component
355-
if (opts.element.data("select2") !== undefined) {
355+
if (opts.element.data("select2") !== undefined &&
356+
opts.element.data("select2") !== null) {
356357
this.destroy();
357358
}
358359

@@ -544,6 +545,7 @@
544545

545546
this.updateResults(true);
546547
this.dropdown.show();
548+
this.ensureHighlightVisible();
547549
this.focusSearch();
548550
},
549551

@@ -1121,6 +1123,7 @@
11211123
killEvent(e);
11221124
return;
11231125
case KEY.ENTER:
1126+
case KEY.TAB:
11241127
this.selectHighlighted();
11251128
killEvent(e);
11261129
return;

0 commit comments

Comments
 (0)