Skip to content
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

Merged
merged 1 commit into from
Jun 6, 2017

Conversation

crisbeto
Copy link
Member

  • Emits the attachments when everything has been attached.
  • Emits the detachments when everything has been detached.
  • Completes the attachments observable before the detachments.

Fixes #4871.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 30, 2017
Copy link
Member

@jelbourn jelbourn left a 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

@@ -53,6 +52,8 @@ export class OverlayRef implements PortalHost {
this._attachBackdrop();
}

this._attachments.next();
Copy link
Member

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.

@@ -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();
Copy link
Member

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

@crisbeto crisbeto force-pushed the 4871/overlay-callback-order branch from 5a1c098 to cfad200 Compare May 31, 2017 17:13
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 31, 2017
@crisbeto crisbeto force-pushed the 4871/overlay-callback-order branch from cfad200 to d81b57c Compare May 31, 2017 17:14
@andrewseguin
Copy link
Contributor

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.
@crisbeto crisbeto force-pushed the 4871/overlay-callback-order branch from d81b57c to efea69e Compare June 6, 2017 17:42
@andrewseguin andrewseguin merged commit e98372e into angular:master Jun 6, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overlay attachments observable is triggered before the attachment is complete
4 participants