File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy {
584584 // Adjust the overly position when it is placed inline relative to its parent.
585585 const insertOverlayAfter = this . _overlayRef . getConfig ( ) . insertOverlayAfter ;
586586 if ( insertOverlayAfter ) {
587- const rect = insertOverlayAfter ! . nativeElement . getBoundingClientRect ( ) ;
587+ const rect = insertOverlayAfter ! . nativeElement . parentElement . getBoundingClientRect ( ) ;
588588 overlayStartX -= rect . left ;
589589 overlayStartY -= rect . top ;
590590 }
@@ -909,6 +909,14 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy {
909909 const maxHeight = this . _overlayRef . getConfig ( ) . maxHeight ;
910910 const maxWidth = this . _overlayRef . getConfig ( ) . maxWidth ;
911911
912+ // Adjust the overly position when it is placed inline relative to its parent.
913+ const insertOverlayAfter = this . _overlayRef . getConfig ( ) . insertOverlayAfter ;
914+ if ( insertOverlayAfter ) {
915+ const rect = insertOverlayAfter ! . nativeElement . parentElement . getBoundingClientRect ( ) ;
916+ boundingBoxRect . left -= rect . left ;
917+ boundingBoxRect . top -= rect . top ;
918+ }
919+
912920 styles . height = coerceCssPixelValue ( boundingBoxRect . height ) ;
913921 styles . top = coerceCssPixelValue ( boundingBoxRect . top ) ;
914922 styles . bottom = coerceCssPixelValue ( boundingBoxRect . bottom ) ;
You can’t perform that action at this time.
0 commit comments