This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
core/services/interimElement Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -834,7 +834,7 @@ MdChipsCtrl.prototype.configureUserInput = function(inputElement) {
834
834
// Find the NgModelCtrl for the input element
835
835
var ngModelCtrl = inputElement . controller ( 'ngModel' ) ;
836
836
// `.controller` will look in the parent as well.
837
- if ( ngModelCtrl != this . ngModelCtrl ) {
837
+ if ( ngModelCtrl !== this . ngModelCtrl ) {
838
838
this . userInputNgModelCtrl = ngModelCtrl ;
839
839
}
840
840
Original file line number Diff line number Diff line change 206
206
tabindex="{{$mdChipsCtrl.ariaTabIndex == $index ? 0 : -1}}"\
207
207
id="{{$mdChipsCtrl.contentIdFor($index)}}"\
208
208
role="option"\
209
- aria-selected="{{$mdChipsCtrl.selectedChip == $index}}" \
209
+ aria-selected="{{$mdChipsCtrl.selectedChip === $index}}"\
210
210
aria-posinset="{{$index}}"\
211
211
ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)"\
212
212
ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)"\
376
376
377
377
element
378
378
. attr ( { tabindex : - 1 } )
379
- . on ( 'focus' , function ( ) { mdChipsCtrl . onFocus ( ) ; } ) ;
379
+ . on ( 'focus' , function ( ) { mdChipsCtrl . onFocus ( ) ; } )
380
+ . on ( 'click' , function ( ) {
381
+ if ( ! mdChipsCtrl . readonly && mdChipsCtrl . selectedChip === - 1 ) {
382
+ mdChipsCtrl . onFocus ( ) ;
383
+ }
384
+ } ) ;
380
385
381
386
if ( attr . ngModel ) {
382
387
mdChipsCtrl . configureNgModel ( element . controller ( 'ngModel' ) ) ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ angular.module('material.core')
8
8
*
9
9
* @description
10
10
*
11
- * Factory that contructs `$$interimElement.$service` services.
11
+ * Factory that constructs `$$interimElement.$service` services.
12
12
* Used internally in material design for elements that appear on screen temporarily.
13
13
* The service provides a promise-like API for interacting with the temporary
14
14
* elements.
You can’t perform that action at this time.
0 commit comments