From 058ecae750aee70c706f3f7e2adee09e02b2a13f Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Fri, 18 May 2012 14:50:35 -0700 Subject: [PATCH 1/3] fixes #61 --- select2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/select2.js b/select2.js index 1238e3d7..210a1269 100755 --- a/select2.js +++ b/select2.js @@ -544,6 +544,7 @@ this.updateResults(true); this.dropdown.show(); + this.ensureHighlightVisible(); this.focusSearch(); }, From 66b789939f7b15f4d41a77acaed96ae0295d809b Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Tue, 22 May 2012 09:30:10 -0400 Subject: [PATCH 2/3] Adding tab support for tags When you select a tag currently the only way to select it was by using the enter key. This change allows the tab key to also select it. Signed-off-by: Eric Barnes --- select2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/select2.js b/select2.js index 210a1269..f530fb2d 100755 --- a/select2.js +++ b/select2.js @@ -1122,6 +1122,7 @@ killEvent(e); return; case KEY.ENTER: + case KEY.TAB: this.selectHighlighted(); killEvent(e); return; From 6dcb2764854cafda86ec87cfaafa41ccdf113bf4 Mon Sep 17 00:00:00 2001 From: Geoffrey Hing Date: Tue, 22 May 2012 11:40:42 -0500 Subject: [PATCH 3/3] Check for nonexistent data attribute in a way that works in jQuery 1.4.2 --- select2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 210a1269..5edda9ca 100755 --- a/select2.js +++ b/select2.js @@ -352,7 +352,8 @@ this.id=opts.id; // destroy if called on an existing component - if (opts.element.data("select2") !== undefined) { + if (opts.element.data("select2") !== undefined && + opts.element.data("select2") !== null) { this.destroy(); }