[FIX] web: m2o extra button misaligned on mobile
Before this fix, the extra button was out of the right edge of the screen. On desktop, m2o external buttons have to overflow over the right padding of the parent element. This is done to avoid to reduce the size of the input when the button appears (when a value is set). But on mobile, there is not enough padding and we therefore prefer to reduce the size of the field if an extra button should appear. To fix this, we simply ignore these rules on mobile. Note that the css selector that really cause this issue was the one related to '.o_row' and the second one has no effect. Steps to reproduce: - Go to "Inventory / Operations / Scrap" - Click on "Create" - Choose a product and set UOM field Related task-ID: 1929043 closes odoo/odoo#66463 X-original-commit: 2fc36e91d95b81f79d0a23f3958011c55a7ff105 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com> Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
@@ -577,14 +577,16 @@ $o-form-label-margin-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
:not(.o_row):not(.o_data_cell) > .o_field_widget,
|
||||
.o_row > .o_field_widget:last-child { // Note: this does not take care
|
||||
// of an invisible last-child but
|
||||
// it does not really matter
|
||||
// Makes extra buttons (e.g. m2o external button) overflow on the
|
||||
// right padding of the parent element
|
||||
.o_input_dropdown {
|
||||
flex: 1 0 auto;
|
||||
@include media-breakpoint-up(sm) {
|
||||
:not(.o_row):not(.o_data_cell) > .o_field_widget,
|
||||
.o_row > .o_field_widget:last-child { // Note: this does not take care
|
||||
// of an invisible last-child but
|
||||
// it does not really matter
|
||||
// Makes extra buttons (e.g. m2o external button) overflow on the
|
||||
// right padding of the parent element
|
||||
.o_input_dropdown {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user