1
0
mirror of synced 2025-02-09 16:49:24 +03:00

fix tabindex for both multi and single. fixes #1169

This commit is contained in:
Igor Vaynberg 2013-04-10 12:56:30 -07:00
parent bc2c780449
commit 45995d0f34

View File

@ -649,8 +649,6 @@ 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");
this.container.find(".select2-focusser").attr("tabindex", this.elementTabIndex);
this.resultsPage = 0;
this.context = null;
@ -1707,7 +1705,7 @@ the specific language governing permissions and limitations under the Apache Lic
// single
initContainer: function () {
var selection,
var sel0ection,
container = this.container,
dropdown = this.dropdown,
clickingInside = false;
@ -1720,9 +1718,12 @@ the specific language governing permissions and limitations under the Apache Lic
// rewrite labels from original element to focusser
this.focusser.attr("id", "s2id_autogen"+nextUid());
$("label[for='" + this.opts.element.attr("id") + "']")
.attr('for', this.focusser.attr('id'));
this.focusser.attr("tabindex", this.elementTabIndex);
this.search.bind("keydown", this.bind(function (e) {
if (!this.enabled) return;
@ -2185,6 +2186,8 @@ the specific language governing permissions and limitations under the Apache Lic
}
}));
this.search.attr("tabindex", this.elementTabIndex);
this.search.bind("keydown", this.bind(function (e) {
if (!this.enabled) return;