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 dropups and add positioning #1747

Closed
pkozlowski-opensource opened this issue Aug 11, 2017 · 9 comments
Closed

fix dropups and add positioning #1747

pkozlowski-opensource opened this issue Aug 11, 2017 · 9 comments

Comments

@pkozlowski-opensource
Copy link
Member

dropdowns are not dropping up with Bootstrap 4.beta. The fix is not trivial as we need to use the positioning service.

@achimha
Copy link

achimha commented Aug 13, 2017

Is there any workaround for the time being?

@bgaillard
Copy link

Hi, as @achimha we also need to quickly fix this, is their a simple workaround ?

@pkozlowski-opensource
Copy link
Member Author

@achimha @bgaillard I'm not aware of any work-around but we are going to release a patch (beta.2) this week with a fix. If you really need it urgently please consider sending a PR. Thnx!

@bgaillard
Copy link

Hi @pkozlowski-opensource, releasing a patch this week would be perfect for us.

Thanks a lot for your reactivity !

@pkozlowski-opensource
Copy link
Member Author

@achimha @bgaillard please review #1752 if you want to see it fixed faster :-)

@bgaillard
Copy link

Hi @pkozlowski-opensource, thanks a lot for this PR.

After testing I'm think I do not encounter the same bug as @achimha.

In my case the problem is that the Dropdown is placed outside the screen. I initially though the bug was the same because #1748 was marked as a duplicate of this case and was is positioning problems.

The following screenshots shows the problem I currently encounter with beta.1 version at left (the dropdown is placed outside the screen).

At right this is a screenshot of what I had with the last alpha version (this is the expected behavior).

On those screenshots the border of my screen is at right of the "grey scroll bar".

dropdown-bug

Do you know if its an ng-bootstrap bug or a Twitter Bootstrap 4 bug ?

I'm in holidays tonight so i do not have any time to test if this bug comes from Twitter Bootstrap or ng-bootstrap. During my holidays my co-worker @simonbaudry will be able to respond you I he has not too much work :).

@achimha
Copy link

achimha commented Aug 18, 2017

@bgaillard that's exactly the problem I'm seeing, dropdown-menu-right doesn't work with beta 1 because Bootstrap 4 switched to a Javascript positioning service.

@pkozlowski-opensource
Copy link
Member Author

dropdown-menu-right doesn't work with beta 1 because Bootstrap 4 switched to a Javascript positioning service.

Exactly. Since Bootstrap moved away from CSS and switched to JS we need to do the same. The first step is to use JS to position things and this is what #1752 does. #1752 will restore dropups but won't help with cropping and auto-positioning - this will be handled in #1171 (but in order to make it work we need to beef up our positioning service).

@bgaillard
Copy link

Hi, thanks for your work on this, my co-worker @simonbaudry fixed our problems thanks to your comments and other issues linked to it.

rmeans pushed a commit to fcsa-teamhammer/ng-bootstrap that referenced this issue Oct 18, 2017
Fixes ng-bootstrap#1747
Part of ng-bootstrap#1171
Part of ng-bootstrap#1012

BREAKING CHANGE:

The `up` input is no longer supported by you can use more flexible
`placement` setting now.

Before:

```html
<div ngbDropdown [up]="true">
```

After:

```html
<div ngbDropdown placement="top-right">
```

Closes ng-bootstrap#1752
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