File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ class FormLayout extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))
293
293
requestAnimationFrame ( ( ) => this . _updateLayout ( ) ) ;
294
294
295
295
this . _observeChildrenColspanChange ( ) ;
296
- this . __intersectionObserver . observe ( this ) ;
296
+ this . __intersectionObserver . observe ( this . $ . layout ) ;
297
297
}
298
298
299
299
/** @protected */
Original file line number Diff line number Diff line change @@ -580,6 +580,42 @@ describe('form layout', () => {
580
580
} ) ;
581
581
} ) ;
582
582
583
+ describe ( 'fixed size parent' , ( ) => {
584
+ let container , layout ;
585
+
586
+ beforeEach ( async ( ) => {
587
+ container = fixtureSync ( `
588
+ <div style="height: 100px; overflow: auto">
589
+ <div style="height: 25px">
590
+ <vaadin-form-layout style="height: 100%">
591
+ <div>1</div>
592
+ <div>2</div>
593
+ <div>3</div>
594
+ <div>4</div>
595
+ <div>5</div>
596
+ <div>6</div>
597
+ <div>7</div>
598
+ <div>8</div>
599
+ <div>9</div>
600
+ <div>10</div>
601
+ </vaadin-form-layout>
602
+ </div>
603
+ </div>
604
+ ` ) ;
605
+ layout = container . querySelector ( 'vaadin-form-layout' ) ;
606
+ layout . responsiveSteps = [ { columns : 1 } ] ;
607
+ await nextRender ( ) ;
608
+ } ) ;
609
+
610
+ it ( 'should not set opacity to 0 when host is scrolled out due to fixed height' , async ( ) => {
611
+ container . scrollTop = container . scrollHeight ;
612
+ // Wait for intersection observer
613
+ await nextFrame ( ) ;
614
+ await nextFrame ( ) ;
615
+ expect ( layout . $ . layout . style . opacity ) . to . equal ( '' ) ;
616
+ } ) ;
617
+ } ) ;
618
+
583
619
describe ( 'mutations' , ( ) => {
584
620
let container , layout ;
585
621
You can’t perform that action at this time.
0 commit comments