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

feat(dialog): allow for closing on navigation to be disabled #9024

Merged

Conversation

crisbeto
Copy link
Member

Allows consumers to opt out of the functionality that closes all of the open dialogs when going backwards/forwards in history.

Fixes #8983.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 17, 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

@@ -42,9 +44,13 @@ export class MatDialogRef<T, R = any> {
/** Result to be passed to afterClosed. */
private _result: R | undefined;

/** Subscription to changes in the user's location. */
private _locationChanges: ISubscription = Subscription.EMPTY;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this ISubscription instead of Subscription?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because the Angular Location isn't actually an observable and it doesn't return a regular Subscription.

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Dec 18, 2017
@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Dec 18, 2017
@crisbeto crisbeto force-pushed the 8983/dialog-disable-navigation-close branch from c683407 to d917bb4 Compare December 27, 2017 08:13
@jelbourn
Copy link
Member

jelbourn commented Jan 4, 2018

@crisbeto this passes presubmit, I can merge once you're able to rebase

Allows consumers to opt out of the functionality that closes all of the open dialogs when going backwards/forwards in history.

Fixes angular#8983.
@crisbeto crisbeto force-pushed the 8983/dialog-disable-navigation-close branch from d917bb4 to 4e08418 Compare January 5, 2018 07:34
@crisbeto
Copy link
Member Author

crisbeto commented Jan 5, 2018

Rebased.

@jelbourn jelbourn merged commit c349c58 into angular:master Jan 8, 2018
tinayuangao pushed a commit that referenced this pull request Jan 10, 2018
Allows consumers to opt out of the functionality that closes all of the open dialogs when going backwards/forwards in history.

Fixes #8983.
@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 8, 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 target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dialog] Closed on browser back button
3 participants