Skip to content
Snippets Groups Projects
Commit f87daf1d authored by Benjamin Vray's avatar Benjamin Vray
Browse files

[FIX] website_form: fix items width in we-list when dragging them


This commit fixes an issue with the width of items in the we-list not
being correct when they are being dragged using jQuery's sortable
feature.

Steps to reproduce the bug:

- Drop a "Form" snippet on a page.
- Add a "Multiple Checkboxes" field in the form.
- Move an option from the list using the move button.
- Bug: while dragging the item, the width of the items is too small.

When an element is dragged, it is given an absolute position which takes
it out of the normal flow of the document, causing the input element
within the list item to no longer be able to correctly occupy 100% of
the available width.

task-3138662

closes odoo/odoo#110871

Signed-off-by: default avatarGuillaume-gdi <gdi@odoo.com>
parent 4d3a92ee
Branches
Tags
No related merge requests found
......@@ -9,7 +9,6 @@
overflow-y: auto;
table {
table-layout: fixed;
width: 100%;
input {
......@@ -22,12 +21,19 @@
font-family: $o-we-sidebar-content-field-input-font-family;
}
tr {
// Since the sortable list's <tr> loses its connection with
// the table when dragged, the <td> with the input no longer
// takes up the full width, causing a visual issue. To solve
// this problem, we added the 'flex' display property.
display: flex;
border: 1px solid rgba(white, 0.1);
border-left: none;
border-right: none;
}
td {
flex-grow: 1;
&:first-child, &:last-child {
flex-grow: 0;
width: 28px;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment