Skip to content

Commit

Permalink
[FIX] web: fix form view dropdown's buttons shifted on Edge
Browse files Browse the repository at this point in the history
In form views, there are stat buttons.

When the window size is too small, some buttons are packed into
a "More" dropdown.

Before this commit:

    - The form view dropdown's buttons are shifted on Microsoft Edge
      and IE 11.

After this commit:

    - The form view dropdown's buttons are not shifted anymore on
      Microsoft Edge and IE 11.

There was a fixed line-height on the button's icon. On Edge and IE 11,
it makes the icon moving down and this causes the offsetting.

The purpose of the line-height was to fix the button height to 44 pixels

So, I set up the button's height and centered the content.

Also, I removed a useless border-left because there was already one
border on the dropdown container.

OPW-2079694

closes odoo#39380

Signed-off-by: Nans Lefebvre (len) <[email protected]>
  • Loading branch information
jvm-odoo committed Oct 31, 2019
1 parent 2bda823 commit a7d9f2a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions addons/web/static/src/scss/form_view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,28 @@
}
}
}

@mixin dropdownButtonsFix {
.btn.oe_stat_button.dropdown-item {
height: 44px !important;
padding: 5px 0 5px 0 !important;
border-left: none !important;

> .o_button_icon {
line-height: normal;
}
}
}

// IE 11 only
@media all and (-ms-high-contrast:none) {
@include dropdownButtonsFix
}

// Edge only
@supports (display:-ms-grid) {
@include dropdownButtonsFix
}
}

// Title
Expand Down

0 comments on commit a7d9f2a

Please sign in to comment.