Skip to content

Commit bc2c780

Browse files
joostheijkoopivaynberg
authored andcommitted
Fix tabindexing
Actually set tabindex on the select2-focusser for focussing on tab navigation Signed-off-by: Igor Vaynberg <igor.vaynberg@gmail.com>
1 parent f582d8a commit bc2c780

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

select2.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,13 @@ the specific language governing permissions and limitations under the Apache Lic
632632
this.container.css(evaluate(opts.containerCss));
633633
this.container.addClass(evaluate(opts.containerCssClass));
634634

635-
this.elementTabIndex = this.opts.element.attr("tabIndex");
635+
this.elementTabIndex = this.opts.element.attr("tabindex");
636636

637637
// swap container for the element
638638
this.opts.element
639639
.data("select2", this)
640640
.bind("focus.select2", function() { $(this).select2("focus"); })
641-
.attr("tabIndex", "-1")
641+
.attr("tabindex", "-1")
642642
.before(this.container);
643643
this.container.data("select2", this);
644644

@@ -649,7 +649,7 @@ the specific language governing permissions and limitations under the Apache Lic
649649
this.results = results = this.container.find(resultsSelector);
650650
this.search = search = this.container.find("input.select2-input");
651651

652-
search.attr("tabIndex", this.elementTabIndex);
652+
this.container.find(".select2-focusser").attr("tabindex", this.elementTabIndex);
653653

654654
this.resultsPage = 0;
655655
this.context = null;
@@ -723,7 +723,7 @@ the specific language governing permissions and limitations under the Apache Lic
723723
.removeClass("select2-offscreen")
724724
.removeData("select2")
725725
.unbind(".select2")
726-
.attr({"tabIndex": this.elementTabIndex})
726+
.attr({"tabindex": this.elementTabIndex})
727727
.show();
728728
}
729729
},

0 commit comments

Comments
 (0)