File tree Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,10 @@ export class FocusMonitor implements OnDestroy {
385385 this . _unregisterGlobalListeners = ( ) => { } ;
386386 }
387387 }
388+
389+ private _getNativeElement ( element : HTMLElement | ElementRef < HTMLElement > ) : HTMLElement {
390+ return element instanceof ElementRef ? element . nativeElement : element ;
391+ }
388392}
389393
390394
Original file line number Diff line number Diff line change @@ -142,32 +142,6 @@ describe('MatRipple', () => {
142142 expect ( rippleTarget . querySelectorAll ( '.mat-ripple-element' ) . length ) . toBe ( 0 ) ;
143143 } ) ) ;
144144
145- it ( 'should launch multiple ripples for multi-touch' , fakeAsync ( ( ) => {
146- const touchEvent = createTouchEvent ( 'touchstart' ) ;
147-
148- Object . defineProperties ( touchEvent , {
149- changedTouches : {
150- value : [
151- { pageX : 0 , pageY : 0 } ,
152- { pageX : 10 , pageY : 10 } ,
153- { pageX : 20 , pageY : 20 }
154- ]
155- }
156- } ) ;
157-
158- dispatchEvent ( rippleTarget , touchEvent ) ;
159- expect ( rippleTarget . querySelectorAll ( '.mat-ripple-element' ) . length ) . toBe ( 3 ) ;
160-
161- tick ( enterDuration ) ;
162- expect ( rippleTarget . querySelectorAll ( '.mat-ripple-element' ) . length ) . toBe ( 3 ) ;
163-
164- dispatchTouchEvent ( rippleTarget , 'touchend' ) ;
165-
166- tick ( exitDuration ) ;
167-
168- expect ( rippleTarget . querySelectorAll ( '.mat-ripple-element' ) . length ) . toBe ( 0 ) ;
169- } ) ) ;
170-
171145 it ( 'should ignore synthetic mouse events after touchstart' , ( ) => fakeAsync ( ( ) => {
172146 dispatchTouchEvent ( rippleTarget , 'touchstart' ) ;
173147 dispatchTouchEvent ( rippleTarget , 'mousedown' ) ;
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ export class MatSelectionListChange {
8383 '(click)' : '_handleClick()' ,
8484 'tabindex' : '-1' ,
8585 '[class.mat-list-item-disabled]' : 'disabled' ,
86- '[class.mat-list-item-focus]' : '_hasFocus' ,
8786 '[class.mat-list-item-with-avatar]' : '_avatar' ,
8887 '[attr.aria-selected]' : 'selected.toString()' ,
8988 '[attr.aria-disabled]' : 'disabled.toString()' ,
You can’t perform that action at this time.
0 commit comments