-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/dialog): content directives picking up wrong ref for stacked mixed type dialogs #21579
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
Open
crisbeto
wants to merge
1
commit into
angular:main
Choose a base branch
from
crisbeto:dialog-stacked-ref
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97d0136
to
a6502df
Compare
jelbourn
previously approved these changes
Jan 13, 2021
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
a6502df
to
8b7a29b
Compare
8b7a29b
to
8eda82e
Compare
8eda82e
to
08f36f7
Compare
08f36f7
to
e701706
Compare
devversion
previously approved these changes
Aug 18, 2021
…cked mixed type dialogs The dialog content directives try to resolve their closest dialog using DI, and if it fails (e.g. inside a template dialog), they fall back to resolving it through the DOM. This becomes problematic if the `ng-template` was declared inside another dialog component, because it'll pick up the declaration dialog, not the one that the button exists in. These changes remove the resolution using DI and switch to only going through the DOM. Fixes angular#21554.
e701706
to
bf95d4a
Compare
I'll mark this as blocked for now. There should be a better way of doing it with injectors now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
blocked
This issue is blocked by some external factor, such as a prerequisite PR
cla: yes
PR author has agreed to Google's Contributor License Agreement
target: patch
This PR is targeted for the next patch release
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dialog content directives try to resolve their closest dialog using DI, and if it fails (e.g. inside a template dialog), they fall back to resolving it through the DOM. This becomes problematic if the
ng-template
was declared inside another dialog component, because it'll pick up the declaration dialog, not the one that the button exists in.These changes remove the resolution using DI and switch to only going through the DOM.
Fixes #21554.