-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(overlay): restore previous host element before attaching #17855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Is there a bug this is fixing? Are you able to add a unit test that captures the desired behavior? |
|
Yes, I am trying to calculate the size of the overlay in my own I will add a unit test for that. |
|
I added the test. I double-checked it; without my fix it fails as expected. |
|
Pushed the requested change. |
crisbeto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jelbourn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Can this be merged? |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The first time when
PositionStrategy.attach()is called, the overlay is already added to the DOM. However, after detaching and attaching again, it is not yet added to the DOM.This PR changes the order and first restores the host element back, and then invokes the
attach()method.