From bc2c780449468f3dde339296daa7088f777519b6 Mon Sep 17 00:00:00 2001 From: leipie Date: Wed, 10 Apr 2013 13:18:29 +0200 Subject: [PATCH] Fix tabindexing Actually set tabindex on the select2-focusser for focussing on tab navigation Signed-off-by: Igor Vaynberg --- select2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/select2.js b/select2.js index fbe8d808..34138e77 100644 --- a/select2.js +++ b/select2.js @@ -632,13 +632,13 @@ the specific language governing permissions and limitations under the Apache Lic this.container.css(evaluate(opts.containerCss)); this.container.addClass(evaluate(opts.containerCssClass)); - this.elementTabIndex = this.opts.element.attr("tabIndex"); + this.elementTabIndex = this.opts.element.attr("tabindex"); // swap container for the element this.opts.element .data("select2", this) .bind("focus.select2", function() { $(this).select2("focus"); }) - .attr("tabIndex", "-1") + .attr("tabindex", "-1") .before(this.container); this.container.data("select2", this); @@ -649,7 +649,7 @@ the specific language governing permissions and limitations under the Apache Lic this.results = results = this.container.find(resultsSelector); this.search = search = this.container.find("input.select2-input"); - search.attr("tabIndex", this.elementTabIndex); + this.container.find(".select2-focusser").attr("tabindex", this.elementTabIndex); this.resultsPage = 0; this.context = null; @@ -723,7 +723,7 @@ the specific language governing permissions and limitations under the Apache Lic .removeClass("select2-offscreen") .removeData("select2") .unbind(".select2") - .attr({"tabIndex": this.elementTabIndex}) + .attr({"tabindex": this.elementTabIndex}) .show(); } },