-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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): add backdrop #1041
Conversation
f652ee6
to
7924997
Compare
7924997
to
c12b9cd
Compare
this._backdropElement.classList.add('md-overlay-backdrop'); | ||
this._pane.parentElement.appendChild(this._backdropElement); | ||
|
||
// Forward backdrop clicks that that the consumer of the overlay can perform whatever |
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.
that that
-> such that
LGTM, just a few typos and questions about Sass. |
LGTM as well except the few points above. |
// Forward backdrop clicks that that the consumer of the overlay can perform whatever | ||
// action desired when such a click occurs (usually closing the overlay). | ||
this._backdropElement.addEventListener('click', () => { | ||
this._backdropClick.next(null); |
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.
Is it intentionally to not pass the DOM event to the Subject
? It is not necessary but would be a good improvement though.
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.
I want to keep any DOM stuff out of public-facing APIs for now (keeping potential running on web-workers in mind).
Addressed comments (added todo for fullscreen, since I'm not sure it will stick around forever). |
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. |
R: @kara @hansl
This adds support to the Overlay to add a backdrop. Components that consume the overlay can take the clicks on the backdrop and do whatever they want with them.
This also cleans up the dialog tests; they no longer need a
setTimeout
with the recent changes tofakeAsync
in core.