Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 40 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesfix(overlay): restore previous host element before attaching #17855
+27
−4
Conversation
This comment has been minimized.
This comment has been minimized.
Is there a bug this is fixing? Are you able to add a unit test that captures the desired behavior? |
This comment has been minimized.
This comment has been minimized.
Yes, I am trying to calculate the size of the overlay in my own I will add a unit test for that. |
This comment has been minimized.
This comment has been minimized.
I added the test. I double-checked it; without my fix it fails as expected. |
This comment has been minimized.
This comment has been minimized.
Pushed the requested change. |
LGTM |
LGTM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
dirkluijk commentedDec 2, 2019
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.