Skip to content
This repository has been archived by the owner on Nov 24, 2017. It is now read-only.

don't stop propagation of click events from content #37

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

kfrijters
Copy link
Contributor

For instance when using a dropdown with an outsideClick listener, the click event should not be catched by the modal

@kfrijters
Copy link
Contributor Author

Borrowed the solution from:
ng-bootstrap/ng-bootstrap#1013

@pleerock pleerock merged commit 062e2c9 into pleerock:master Jan 12, 2017
@pleerock
Copy link
Owner

Hi. Thank you for this PR. Please make sure to enable tslint next time.

@pleerock
Copy link
Owner

I reverted this commit because it bring problems with dropdown inside modal. (I use ng2-dropdown/ngx-dropdown now). Clicks inside dropdown in modal was closing the modal with this PR merged. Can you provide example of what problem you had?

@kfrijters
Copy link
Contributor Author

Something pretty similar: but using https://github.com/arkon/ng-click-outside to close a popup.

Are the contents of your dropdown rendered inside or outside of the modal component html tree? if it's rendered outside, than it would be registered as an outside click ( to fix this you could add event.stopPropagation() ) to a click inside your dropdown.

@dschmitz-gsits
Copy link

@pleerock - updated the approach of @m1nd53t slightly so that it should work for the dropdowns as well. What do you think?

master...dschmitz-gsits:master

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

Successfully merging this pull request may close these issues.

3 participants