-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(overlay): emit attach and detach at appropriate times #4880
fix(overlay): emit attach and detach at appropriate times #4880
Conversation
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, just a couple minor comments; can add "merge-ready" when done
src/lib/core/overlay/overlay-ref.ts
Outdated
@@ -53,6 +52,8 @@ export class OverlayRef implements PortalHost { | |||
this._attachBackdrop(); | |||
} | |||
|
|||
this._attachments.next(); |
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.
Add a comment like
// Only emit the `attachments` event once all other setup is done.
src/lib/core/overlay/overlay-ref.ts
Outdated
@@ -68,9 +69,12 @@ export class OverlayRef implements PortalHost { | |||
// pointer events therefore. Depends on the position strategy and the applied pane boundaries. | |||
this._togglePointerEvents(false); | |||
this._state.scrollStrategy.disable(); | |||
|
|||
let detachmentResult = this._portalHost.detach(); |
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.
Same kind of comment here
5a1c098
to
cfad200
Compare
cfad200
to
d81b57c
Compare
Please rebase |
* Emits the `attachments` when everything has been attached. * Emits the `detachments` when everything has been detached. * Completes the `attachments` observable before the `detachments`. Fixes angular#4871.
d81b57c
to
efea69e
Compare
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. |
attachments
when everything has been attached.detachments
when everything has been detached.attachments
observable before thedetachments
.Fixes #4871.