@@ -167,6 +167,17 @@ describe('MdRipple', () => {
167
167
expect ( rippleTarget . querySelectorAll ( '.mat-ripple-element' ) . length ) . toBe ( 0 ) ;
168
168
} ) ;
169
169
170
+ it ( 'does not run events inside the NgZone' , ( ) => {
171
+ const spy = jasmine . createSpy ( 'zone unstable callback' ) ;
172
+ const subscription = fixture . ngZone . onUnstable . subscribe ( spy ) ;
173
+
174
+ dispatchMouseEvent ( 'mousedown' ) ;
175
+ dispatchMouseEvent ( 'mouseup' ) ;
176
+
177
+ expect ( spy ) . not . toHaveBeenCalled ( ) ;
178
+ subscription . unsubscribe ( ) ;
179
+ } ) ;
180
+
170
181
describe ( 'when page is scrolled' , ( ) => {
171
182
const startingWindowWidth = window . innerWidth ;
172
183
const startingWindowHeight = window . innerHeight ;
@@ -374,7 +385,7 @@ describe('MdRipple', () => {
374
385
375
386
@Component ( {
376
387
template : `
377
- <div id="container" mat-ripple [mdRippleSpeedFactor]="0"
388
+ <div id="container" mat-ripple [mdRippleSpeedFactor]="0"
378
389
style="position: relative; width:300px; height:200px;">
379
390
</div>
380
391
` ,
@@ -387,7 +398,7 @@ class BasicRippleContainer {
387
398
template : `
388
399
<div id="container" style="position: relative; width:300px; height:200px;"
389
400
mat-ripple
390
- [mdRippleSpeedFactor]="0"
401
+ [mdRippleSpeedFactor]="0"
391
402
[mdRippleTrigger]="trigger"
392
403
[mdRippleCentered]="centered"
393
404
[mdRippleRadius]="radius"
@@ -406,7 +417,7 @@ class RippleContainerWithInputBindings {
406
417
@ViewChild ( MdRipple ) ripple : MdRipple ;
407
418
}
408
419
409
- @Component ( { template : `<div id="container" mat-ripple [mdRippleSpeedFactor]="0"
420
+ @Component ( { template : `<div id="container" mat-ripple [mdRippleSpeedFactor]="0"
410
421
*ngIf="!isDestroyed"></div>` } )
411
422
class RippleContainerWithNgIf {
412
423
@ViewChild ( MdRipple ) ripple : MdRipple ;
0 commit comments