[FIX] project: prevent issue on description field resize in form

Prior to this commit:

    - The selector used by the FormHtmlFieldExpanderMixin is the generic one
      '.o_xxl_form_view .oe_form_field.oe_form_field_html'. This selector, altough
      valid, could lead to an undesired behavior if another html field is present
      previously (before the description one) in the view.

After this commit:

    - The '[name="description"] is added to the selector which reduces the possible
      matches only to the one of the description field.

closes odoo/odoo#82926

X-original-commit: db8684055712ec9c5d1acadee60e54a78d87c941
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit is contained in:
Laurent Stukkens (LTU)
2022-01-17 17:50:33 +00:00
parent 7b21821d60
commit d5e40ea78b
@@ -99,6 +99,7 @@ const FormDescriptionExpanderRenderer = FormRenderer.extend(Object.assign({}, Fo
// 58px is the sum of the top margin of o_form_sheet 12 px + the bottom padding of o_form_sheet 24px
// + 5px margin bottom (o_field_widget) + 1px border + the bottom padding of tab-pane 16 px.
bottomDistance: 58,
fieldQuerySelector: '.o_xxl_form_view .oe_form_field.oe_form_field_html[name="description"]',
}));
export const FormDescriptionExpanderView = FormView.extend({