@@ -330,7 +330,7 @@ describe('TouchHitTarget', () => {
330
330
ReactDOM . render ( < Test /> , container ) ;
331
331
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
332
332
expect ( container . innerHTML ) . toBe (
333
- '<div><div style="position: absolute; bottom: -10px; ' +
333
+ '<div><div style="position: absolute; z-index: -1; bottom: -10px; ' +
334
334
'left: -10px; right: -10px; top: -10px;"></div></div>' ,
335
335
) ;
336
336
@@ -362,7 +362,7 @@ describe('TouchHitTarget', () => {
362
362
ReactDOM . render ( < Test /> , container ) ;
363
363
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
364
364
expect ( container . innerHTML ) . toBe (
365
- '<div><div style="position: absolute; bottom: -10px; ' +
365
+ '<div><div style="position: absolute; z-index: -1; bottom: -10px; ' +
366
366
'left: -10px; right: -10px; top: -10px;"></div></div>' ,
367
367
) ;
368
368
} ) ;
@@ -386,7 +386,7 @@ describe('TouchHitTarget', () => {
386
386
ReactDOM . render ( < Test /> , container ) ;
387
387
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
388
388
expect ( container . innerHTML ) . toBe (
389
- '<div><div style="position: absolute; bottom: -10px; ' +
389
+ '<div><div style="position: absolute; z-index: -1; bottom: -10px; ' +
390
390
'left: -10px; right: -10px; top: -10px;"></div></div>' ,
391
391
) ;
392
392
@@ -424,7 +424,7 @@ describe('TouchHitTarget', () => {
424
424
ReactDOM . render ( < Test /> , container ) ;
425
425
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
426
426
expect ( container . innerHTML ) . toBe (
427
- '<div><span>Random span 1</span><div style="position: absolute; bottom: -10px; ' +
427
+ '<div><span>Random span 1</span><div style="position: absolute; z-index: -1; bottom: -10px; ' +
428
428
'left: -10px; right: -10px; top: -10px;"></div><span>Random span 2</span></div>' ,
429
429
) ;
430
430
} ) ;
@@ -455,15 +455,15 @@ describe('TouchHitTarget', () => {
455
455
ReactDOM . render ( < Test /> , container ) ;
456
456
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
457
457
expect ( container . innerHTML ) . toBe (
458
- '<div><span>Random span 1</span><div style="position: absolute; bottom: 0px; ' +
458
+ '<div><span>Random span 1</span><div style="position: absolute; z-index: -1; bottom: 0px; ' +
459
459
'left: -20px; right: 0px; top: 0px;"></div><span>Random span 2</span></div>' ,
460
460
) ;
461
461
462
462
cond = true ;
463
463
ReactDOM . render ( < Test /> , container ) ;
464
464
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
465
465
expect ( container . innerHTML ) . toBe (
466
- '<div><span>Random span 1</span><div style="position: absolute; bottom: 0px; ' +
466
+ '<div><span>Random span 1</span><div style="position: absolute; z-index: -1; bottom: 0px; ' +
467
467
'left: -20px; right: 0px; top: 0px;"></div><span>Random span 2</span></div>' ,
468
468
) ;
469
469
} ) ;
@@ -494,15 +494,15 @@ describe('TouchHitTarget', () => {
494
494
ReactDOM . render ( < Test /> , container ) ;
495
495
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
496
496
expect ( container . innerHTML ) . toBe (
497
- '<div><span>Random span 1</span><div style="position: absolute; bottom: -10px; ' +
497
+ '<div><span>Random span 1</span><div style="position: absolute; z-index: -1; bottom: -10px; ' +
498
498
'left: 0px; right: -10px; top: -10px;"></div><span>Random span 2</span></div>' ,
499
499
) ;
500
500
501
501
cond = false ;
502
502
ReactDOM . render ( < Test /> , container ) ;
503
503
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
504
504
expect ( container . innerHTML ) . toBe (
505
- '<div><span>Random span 1</span><div style="position: absolute; bottom: -10px; ' +
505
+ '<div><span>Random span 1</span><div style="position: absolute; z-index: -1; bottom: -10px; ' +
506
506
'left: 0px; right: -10px; top: -10px;"></div><span>Random span 2</span></div>' ,
507
507
) ;
508
508
} ) ;
@@ -532,11 +532,11 @@ describe('TouchHitTarget', () => {
532
532
533
533
const container2 = document . createElement ( 'div' ) ;
534
534
container2 . innerHTML =
535
- '<div><div style="position:absolute;bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ;
535
+ '<div><div style="position:absolute;z-index:-1; bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ;
536
536
ReactDOM . hydrate ( < Test2 /> , container2 ) ;
537
537
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
538
538
expect ( container2 . innerHTML ) . toBe (
539
- '<div><div style="position:absolute;bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ,
539
+ '<div><div style="position:absolute;z-index:-1; bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ,
540
540
) ;
541
541
} ) ;
542
542
@@ -560,7 +560,8 @@ describe('TouchHitTarget', () => {
560
560
) ;
561
561
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
562
562
expect ( container . innerHTML ) . toBe (
563
- '<div><div style="position: absolute; bottom: -10px; left: -10px; right: -10px; top: -10px;"></div></div>' ,
563
+ '<div><div style="position: absolute; z-index: -1; bottom: -10px; ' +
564
+ 'left: -10px; right: -10px; top: -10px;"></div></div>' ,
564
565
) ;
565
566
} ) ;
566
567
} ) ;
@@ -596,7 +597,7 @@ describe('TouchHitTarget', () => {
596
597
597
598
let output = ReactDOMServer . renderToString ( < Test /> ) ;
598
599
expect ( output ) . toBe (
599
- '<div><div style="position:absolute;bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ,
600
+ '<div><div style="position:absolute;z-index:-1; bottom:-10px;left:-10px;right:-10px;top:-10px"></div></div>' ,
600
601
) ;
601
602
602
603
const Test2 = ( ) => (
@@ -609,7 +610,7 @@ describe('TouchHitTarget', () => {
609
610
610
611
output = ReactDOMServer . renderToString ( < Test2 /> ) ;
611
612
expect ( output ) . toBe (
612
- '<div><div style="position:absolute;bottom:-10px;left:0px;right:0x;top:0px"></div></div>' ,
613
+ '<div><div style="position:absolute;z-index:-1; bottom:-10px;left:0px;right:0x;top:0px"></div></div>' ,
613
614
) ;
614
615
615
616
const Test3 = ( ) => (
@@ -622,7 +623,7 @@ describe('TouchHitTarget', () => {
622
623
623
624
output = ReactDOMServer . renderToString ( < Test3 /> ) ;
624
625
expect ( output ) . toBe (
625
- '<div><div style="position:absolute;bottom:-4px;left:-2px;right:-3px;top:-1px"></div></div>' ,
626
+ '<div><div style="position:absolute;z-index:-1; bottom:-4px;left:-2px;right:-3px;top:-1px"></div></div>' ,
626
627
) ;
627
628
} ) ;
628
629
} ) ;
0 commit comments