This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/components/autocomplete/js Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -150,12 +150,17 @@ function MdAutocomplete () {
150
150
template : function ( element , attr ) {
151
151
var noItemsTemplate = getNoItemsTemplate ( ) ,
152
152
itemTemplate = getItemTemplate ( ) ,
153
- leftover = element . html ( ) ;
153
+ leftover = element . html ( ) ,
154
+ tabindex = attr . tabindex ;
154
155
155
156
if ( noItemsTemplate ) {
156
157
hasNotFoundTemplate = true ;
157
158
}
158
159
160
+ if ( attr . hasOwnProperty ( 'tabindex' ) ) {
161
+ element . attr ( 'tabindex' , '-1' ) ;
162
+ }
163
+
159
164
return '\
160
165
<md-autocomplete-wrap\
161
166
layout="row"\
@@ -216,6 +221,7 @@ function MdAutocomplete () {
216
221
<md-input-container flex ng-if="floatingLabel">\
217
222
<label>{{floatingLabel}}</label>\
218
223
<input type="search"\
224
+ ' + ( tabindex != null ? 'tabindex="' + tabindex + '"' : '' ) + '\
219
225
id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}"\
220
226
name="{{inputName}}"\
221
227
autocomplete="off"\
@@ -238,6 +244,7 @@ function MdAutocomplete () {
238
244
} else {
239
245
return '\
240
246
<input flex type="search"\
247
+ ' + ( tabindex != null ? 'tabindex="' + tabindex + '"' : '' ) + '\
241
248
id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"\
242
249
name="{{inputName}}"\
243
250
ng-if="!floatingLabel"\
You can’t perform that action at this time.
0 commit comments