Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(mdTextField): set tabindex on input if set on mdTextFloat #587

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/textField/textField.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ function mdTextFloatDirective($mdTheming, $mdUtil) {
element.attr('disabled', true);
scope.isDisabled = true;
}

if ( angular.isDefined(attrs.tabindex) ) {
scope.tabIndex = attrs.tabindex;
}
element.attr('tabindex', '-1');

scope.inputType = attrs.type || "text";
element.removeAttr('type');
Expand All @@ -73,7 +78,7 @@ function mdTextFloatDirective($mdTheming, $mdUtil) {
template:
'<md-input-group ng-disabled="isDisabled" tabindex="-1">' +
' <label for="{{fid}}" >{{label}}</label>' +
' <md-input id="{{fid}}" ng-model="value" type="{{inputType}}"></md-input>' +
' <md-input id="{{fid}}" ng-model="value" type="{{inputType}}" tabindex="{{tabIndex}}"></md-input>' +
'</md-input-group>'
};
}
Expand Down