@@ -649,8 +649,6 @@ 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- this . container . find ( ".select2-focusser" ) . attr ( "tabindex" , this . elementTabIndex ) ;
653-
654652 this . resultsPage = 0 ;
655653 this . context = null ;
656654
@@ -1707,7 +1705,7 @@ the specific language governing permissions and limitations under the Apache Lic
17071705 // single
17081706 initContainer : function ( ) {
17091707
1710- var selection ,
1708+ var sel0ection ,
17111709 container = this . container ,
17121710 dropdown = this . dropdown ,
17131711 clickingInside = false ;
@@ -1720,9 +1718,12 @@ the specific language governing permissions and limitations under the Apache Lic
17201718
17211719 // rewrite labels from original element to focusser
17221720 this . focusser . attr ( "id" , "s2id_autogen" + nextUid ( ) ) ;
1721+
17231722 $ ( "label[for='" + this . opts . element . attr ( "id" ) + "']" )
17241723 . attr ( 'for' , this . focusser . attr ( 'id' ) ) ;
17251724
1725+ this . focusser . attr ( "tabindex" , this . elementTabIndex ) ;
1726+
17261727 this . search . bind ( "keydown" , this . bind ( function ( e ) {
17271728 if ( ! this . enabled ) return ;
17281729
@@ -2185,6 +2186,8 @@ the specific language governing permissions and limitations under the Apache Lic
21852186 }
21862187 } ) ) ;
21872188
2189+ this . search . attr ( "tabindex" , this . elementTabIndex ) ;
2190+
21882191 this . search . bind ( "keydown" , this . bind ( function ( e ) {
21892192 if ( ! this . enabled ) return ;
21902193
0 commit comments