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

Dropdown data-boundary option not working in scrollable column #26512

Closed
jacobmllr95 opened this issue May 14, 2018 · 6 comments · Fixed by #28517
Closed

Dropdown data-boundary option not working in scrollable column #26512

jacobmllr95 opened this issue May 14, 2018 · 6 comments · Fixed by #28517
Labels

Comments

@jacobmllr95
Copy link
Contributor

When a dropdown is placed in a scrollable column (.col) the data-boundary option has no effect.
As @rinick pointed out here this is due the columns position: relative; property.

Is this something Bootstrap or popper.js can/should fix or has the user to deal with it?

See: https://codepen.io/jackmu95/pen/XqBWwx

@andresgalante
Copy link
Collaborator

Hi @jackmu95, you are right, since the .col is position relative and the dropmenu is within the col, there is no way to increase the z-index to pop it out.

To be honest I don't see why the col is relative positioned. @mdo what am I missing?

@notaphplover
Copy link

notaphplover commented May 25, 2018

First of all, sorry for my bad english :(.

Hi @jackmu95, I think the library is ok.

After analyzing your code, I´ve seen the following line:

<div class="col-6 d-flex dropdown-container">...</div>

I´m not an expert, but I think this is a bad practice. A col should be a col and no more. The framework is designed keeping this in mind. We use a div for a row and other div for the col due to the same reason.

There are few cases where col and other classes can be together.

I´ve forked your codepen with my implementation, i hope it could help you:

https://codepen.io/koro-sempai/pen/PerKLE.

If I´m not missing something, separating the col and the dropdown-container in two divs solves the problem :), achieving a dropdown-container with position: fixed (by default).

This is just my opinion, I hope it does not sound arrogant :)

@jacobmllr95
Copy link
Contributor Author

@notaphplover You are right that it's bad practice to style columns directly but I couldn't come up with better markup for my concrete situation where I faced the issue.

Here is a pen to show what I mean: https://codepen.io/jackmu95/pen/yjdzvy

The general question here is as @andresgalante mentioned why .col is position relative.

@notaphplover
Copy link

notaphplover commented May 25, 2018

@jackmu95 Ah, ok. Then it was a misunderstood on my part. I´m not able to answer that question, but maybe this thread could be helpful: #25254

@jacobmllr95
Copy link
Contributor Author

@notaphplover Thanks for the investigation!

There is already a PR too (#25255) but it got stuck.
Maybe we could get it rolling again 👍

@notaphplover
Copy link

notaphplover commented May 25, 2018

@jackmu95 You are welcome. Yeah, it would be wonderful ^_^ 👍 .

@mdo mdo removed their assignment Aug 24, 2018
@jacobmllr95 jacobmllr95 mentioned this issue Apr 23, 2019
9 tasks
kebeclibre added a commit to odoo-dev/odoo that referenced this issue Oct 30, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at odoo#37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121
robodoo pushed a commit to odoo/odoo that referenced this issue Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at #37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes #39541

Signed-off-by: Aaron Bohy (aab) <[email protected]>
kebeclibre added a commit to odoo-dev/odoo that referenced this issue Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at odoo#37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes odoo#39541

Signed-off-by: Aaron Bohy (aab) <[email protected]>
robodoo pushed a commit to odoo/odoo that referenced this issue Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at #37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes #39541

closes #39620

Signed-off-by: Aaron Bohy (aab) <[email protected]>
Signed-off-by: Lucas Perais (lpe) <[email protected]>
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at odoo#37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes odoo#39541

Original-signed-off-by: Aaron Bohy (aab) <[email protected]>
X-original-commit: 7f72b83
robodoo pushed a commit to odoo/odoo that referenced this issue Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at #37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes #39541

closes #39636

Original-signed-off-by: Aaron Bohy (aab) <[email protected]>
X-original-commit: 7f72b83
Signed-off-by: Lucas Perais (lpe) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants