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(modal): don't stop propagation of click events from content #1013

Closed
wants to merge 1 commit into from
Closed

fix(modal): don't stop propagation of click events from content #1013

wants to merge 1 commit into from

Conversation

pkozlowski-opensource
Copy link
Member

Fixes #1011

backdropClick(): void {
if (this.backdrop === true) {
backdropClick($event): void {
if (this.backdrop === true && !this._isNodeChildOfAnother(this.contentEl.nativeElement, $event.target)) {
Copy link
Member

Choose a reason for hiding this comment

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

The block

this._isNodeChildOfAnother(this.contentEl.nativeElement, $event.target)

is longer than how one would do it natively, i.e.

this.contentEl.nativeElement.contains($event.target);

Maybe this should be changed to a shorter name like isContainedBy, or just use the native version.

@wesleycho
Copy link
Member

LGTM, just have a minor comment.

@pkozlowski-opensource
Copy link
Member Author

Thnx @wesleycho - I've killed the _isNodeChildOfAnother abstraction and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants