-
Notifications
You must be signed in to change notification settings - Fork 1.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
chore(dropdown): with autoClose 'outsideClick' closing when clicking inside element #124
Labels
Comments
valorkin
changed the title
Dropdown with autoClose 'outsideClick' closing when clicking inside element
chore(dropdown): with autoClose 'outsideClick' closing when clicking inside element
Feb 3, 2016
It seems the reason is that the menu is never set for the dropdown. This causes the test whether the clicked element is inside the menu to always be false. |
Additionally, the inclusion test only tests for equality instead of doing a proper "contains" check like the original bootstrap code. |
rluba
added a commit
to rluba/ng2-bootstrap
that referenced
this issue
Feb 10, 2016
…ny click - Implement a `DropdownMenu` directive to fix "always undefined directive.menuEl" - Test for "OUTSIDECLICK" should not consider menu children to be outside the menu
rluba
added a commit
to rluba/ng2-bootstrap
that referenced
this issue
Feb 10, 2016
- Implement a `DropdownMenu` directive to fix "always undefined directive.menuEl" - Test for "OUTSIDECLICK" should not consider menu children to be outside the menu This fixes valor-software#124
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i'm working on an implementation of the Dropdown and I'm having some trouble with the autoClose property. I set the autoClose to 'outsideClick' but the dropdown is toggled when I click inside the element as well. Here is what I have:
index.html:
The template of the edit-details component has the following html:
After some debugging I found that in the closeDropdown function in dropdown.service.ts, the this.openScope.menuEl is undefined. I think that the public set dropDownMenu in dropdown.directive.ts is never called, thus the this.menuEl is never set.
Any ideas on this are very welcome. Thanks!
The text was updated successfully, but these errors were encountered: