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

dropdowntoggle does not close when clicking directly on an icon in Chrome #658

Closed
jimfunk opened this issue Jun 28, 2016 · 1 comment
Closed

Comments

@jimfunk
Copy link

jimfunk commented Jun 28, 2016

This seems to only happen in Chrome and it appears to be reproducible on https://valor-software.com/ng2-bootstrap/#/dropdowns

If you click directly on the down arrow, the menu opens up, but clicking on it again does not close the menu. Clicking anywhere else inside the button does close it. This also occurs with FontAwesome icons in the toggle element.

@NikitaForm
Copy link
Contributor

Hi! Looks like the root of this issue is here
https://github.com/valor-software/ng2-bootstrap/blob/development/components/dropdown/dropdown.service.ts#L47
so replacing
this.openScope.toggleEl.nativeElement === event.target
with
this.openScope.toggleEl.nativeElement.contains(event.target)
will fix this bug

NikitaForm pushed a commit to NikitaForm/ng2-bootstrap that referenced this issue Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants