[FIX] web: modal vertical alignment outside the viewport

Some modals (`.o_error_dialog`) have a visual bug and goes outside the
viewport. This bug occurs because the CSS `top` attribute is override by
an inline style.
The result CSS is
```css
.o_error_dialog {
   top: 50%; /* Ignored due to the inline top rule */
   transform: translateY(-50%);
   top: 0; /* Override inline style */
}
```

The commit instead use the Bootstrap 5.1 class `modal-dialog-centered`
to center vertically the modal.

Note: from now all modal will be center vertically as it's the direction
of the future design.

Steps to reproduce:
* Go to `Bank Accounts` menu
* Create a new recode (New button)
* Enter a `Account Number` and select an `Account Holder`
* Then check `Send Money`
* Try to save (cloud icon) => BUG the modal is outside the viewport

closes odoo/odoo#114535

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Romeo Fragomeli
2023-03-09 15:54:50 +01:00
parent f00919461e
commit dd141a22f4
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
t-att-class="{ o_technical_modal: props.technical, o_modal_full: isFullscreen }"
t-ref="modalRef"
>
<div class="modal-dialog" t-attf-class="modal-{{props.size}}">
<div class="modal-dialog modal-dialog-centered" t-attf-class="modal-{{props.size}}">
<div class="modal-content" t-att-class="props.contentClass" t-att-style="contentStyle">
<header t-if="props.header" class="modal-header">
<t t-slot="header" close="data.close" isFullscreen="isFullscreen">
@@ -1,7 +1,4 @@
.o_error_dialog {
top: 50%;
transform: translateY(-50%);
@include media-breakpoint-up(md) {
padding: 1rem;