Skip to content

Commit 86c530e

Browse files
crisbetovivian-hu-zz
authored andcommitted
fix(overlay): reset transform when disposing of position strategy (#14660)
Fixes the `transform` value not being reset when a flexible position strategy is disposed. Fixes #14657.
1 parent a31a2ff commit 86c530e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/cdk/overlay/position/flexible-connected-position-strategy.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ describe('FlexibleConnectedPositionStrategy', () => {
158158
overlayX: 'start',
159159
overlayY: 'top',
160160
originX: 'start',
161-
originY: 'bottom'
161+
originY: 'bottom',
162+
offsetX: 10,
163+
offsetY: 20
162164
}]);
163165

164166
// Needs to be in the DOM for IE not to throw an "Unspecified error".
@@ -185,6 +187,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
185187
expect(pane.style.left).toBeFalsy();
186188
expect(pane.style.right).toBeFalsy();
187189
expect(pane.style.position).toBeFalsy();
190+
expect(pane.style.transform).toBeFalsy();
188191

189192
overlayRef.dispose();
190193
document.body.removeChild(origin);

src/cdk/overlay/position/flexible-connected-position-strategy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy {
857857
bottom: '',
858858
right: '',
859859
position: '',
860+
transform: '',
860861
} as CSSStyleDeclaration);
861862
}
862863

0 commit comments

Comments
 (0)