-
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
+125
−43
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
@crisbeto
crisbeto
added
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
target: patch
This PR is targeted for the next patch release
labels
Jan 13, 2021
@crisbeto
crisbeto
requested review from
devversion and
jelbourn
as code owners
January 13, 2021 20:13
@google-cla
google-cla
bot
added
the
cla: yes
PR author has agreed to Google's Contributor License Agreement
label
Jan 13, 2021
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
January 13, 2021 20:25
97d0136
to
a6502df
Compare
jelbourn
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
@jelbourn
jelbourn
added
the
action: merge
The PR is ready for merge by the caretaker
label
Jan 13, 2021
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
March 14, 2021 12:02
a6502df
to
8b7a29b
Compare
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
April 14, 2021 20:52
8b7a29b
to
8eda82e
Compare
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
June 3, 2021 15:43
8eda82e
to
08f36f7
Compare
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
July 18, 2021 17:55
08f36f7
to
e701706
Compare
devversion
devversion
previously approved these changes
Aug 18, 2021
@andrewseguin
andrewseguin
removed
the
cla: yes
PR author has agreed to Google's Contributor License Agreement
label
Dec 28, 2021
@googlebot
googlebot
added
the
cla: yes
PR author has agreed to Google's Contributor License Agreement
label
Dec 29, 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.
@crisbeto
crisbeto
force-pushed
the
dialog-stacked-ref
branch
from
January 3, 2022 09:24
e701706
to
bf95d4a
Compare
I'll mark this as blocked for now. There should be a better way of doing it with injectors now.
@crisbeto
crisbeto
added
blocked
This issue is blocked by some external factor, such as a prerequisite PR
and removed
action: merge
The PR is ready for merge by the caretaker
labels
Mar 9, 2022
@andrewseguin
andrewseguin
added
needs rebase
and removed
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
labels
Mar 28, 2022
@andrewseguin
andrewseguin
dismissed stale reviews from devversion and jelbourn
via
May 2, 2022 20:32
bf95d4a
@josephperrott
josephperrott
added
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
and removed
needs rebase
labels
Nov 16, 2022
@andrewseguin
andrewseguin
assigned
devversion and
amysorto and unassigned
devversion and
amysorto
Jun 5, 2023
@josephperrott
josephperrott
requested review from
amysorto and
mmalerba
and removed request for
a team
December 18, 2024 17:40
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.
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.