diff options
| author | jvm-odoo <jvm@odoo.com> | 2019-11-14 14:03:49 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-19 16:55:18 +0000 |
| commit | 570ddf700118c383b377581dac2c7ea3de02f0cc (patch) | |
| tree | 44b278c6b86cf68c6cc97ca1b55142a65412169c /addons/web/static/src | |
| parent | 9fca59f5b680dbec071a4146658935ea9cba97fa (diff) | |
[FIX] web: fix big dropdown menu out of screen
Reproduce the issue
- Install CRM
- Go in CRM > Reporting > Pipelines
- Click on the first "Group by" button
The dropdown menu is out of the screen at 100% zoom.
If we want to see the whole menu we have to dezoom ("Ctrl" + "-")
Cause
We are using bootstrap to handle dropdowns. Bootstrap uses a library
named "popper.js" to compute the position of the dropdown according
to the remaining space.
In this case, there is no space left to place the dropdown below
the button, so popper.js flip it above the button and
this cause the issue.
This commit disable the flip from popper.js and set the max height
of the dropdown menu to 140px:
- navbar: 42px
- control panel: 82px
- some margin: 6px
OPW-2116974
closes odoo/odoo#40530
X-original-commit: 9def02699d96f4dfd8dd806d2bec86a872a0c6eb
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
Co-authored-by: aab-odoo <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/scss/dropdown_menu.scss | 2 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/scss/dropdown_menu.scss b/addons/web/static/src/scss/dropdown_menu.scss index 6e6c3a6b640..7ce7412b6d0 100644 --- a/addons/web/static/src/scss/dropdown_menu.scss +++ b/addons/web/static/src/scss/dropdown_menu.scss @@ -4,7 +4,7 @@ } min-width: 150px; - max-height: calc(100vh - 125px); // FIXME + max-height: calc(100vh - 140px); // FIXME overflow: auto; .o_menu_item { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 08fbfe645ce..fcff4c1e312 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1079,7 +1079,7 @@ </t> <div t-name="web.DropdownMenu" t-att-class="widget.dropdownStyle.el.class" t-att="widget.dropdownStyle.el.attrs"> - <button t-att-class="widget.dropdownStyle.mainButton.class" data-toggle="dropdown" aria-expanded="false" tabindex="-1" data-boundary="viewport"> + <button t-att-class="widget.dropdownStyle.mainButton.class" data-toggle="dropdown" aria-expanded="false" tabindex="-1" data-flip="false" data-boundary="viewport"> <span t-att-class="widget.dropdownIcon"/> <t t-esc="widget.dropdownTitle"/> <span t-if="widget.dropdownSymbol" t-att-class="widget.dropdownSymbol"/> </button> <div class="dropdown-menu o_dropdown_menu" role="menu"> |
