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

ngbDropdown closes when scrollbars are used #3063

Closed
kaiza opened this issue Mar 13, 2019 · 7 comments · Fixed by #3113
Closed

ngbDropdown closes when scrollbars are used #3063

kaiza opened this issue Mar 13, 2019 · 7 comments · Fixed by #3113

Comments

@kaiza
Copy link

kaiza commented Mar 13, 2019

Bug description:

If you have an ngbDropdownMenu with a scrollbar and you click on the scrollbar or drag it, the dropdown closes.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-khpeym

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 7.2.5

ng-bootstrap: 4.0.4 but also tried 4.1.0

Bootstrap: 4.3.1

@maxokorokov
Copy link
Member

Hey, @kaiza, as a workaround I'd suggest for this case you use autoClose="outside" and close the dropdown manually when clicking on items, ex. like in this stackblitz → https://stackblitz.com/edit/angular-b9hnfu?file=app/dropdown-form.html

Needs investigation though, in bootstrap it closes when you click in .dropdown-menu, but doesn't when you click on scrollbar indeed.

@kaiza
Copy link
Author

kaiza commented Mar 13, 2019

Thanks @maxokorokov - I already figured out that workaround but the default behaviour definitely doesn't seem right.

@alignsoft
Copy link

Is there a nightly version of the library, or a timeframe for the 4.1.3 release? We're finding this to be a surprisingly severe pain point (users fixate on these things far too much), and I'm looking forward to closing this out in our bug list. Thanks!

@maxokorokov
Copy link
Member

@alignsoft just released, many holidays in May. Let us know if anything is still not working!

@alignsoft
Copy link

Fixed - thanks for the swift response - very much appreciated!

@hinalshah91
Copy link

I am facing the same issue. I am using "@ng-bootstrap/ng-bootstrap": "^5.1.1", "Angular version": "8.2.8". I tried using autoClose="outside", but the dropdown doesn't close after selection. We need to manually close it.

@maxokorokov
Copy link
Member

@hinalshah91 the use case in question works fine with Angular 8.1 and ng-bootstrap 5.1.1 → ex. https://stackblitz.com/edit/angular-khpeym-wepb7j?file=app/app.component.ts

Commenting on closed issues is usually not helpful, I've seen this one by change. Open a new one with the minimal reproduction scenario if you have any issues.

@ng-bootstrap ng-bootstrap locked as resolved and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants