[FIX] web_editor: make we-input full-width if unit is large
The design was made considering the units would not be bigger than 2 or 3 characters... but it is currently used with translated texts like "products". In those cases, force the input to be full-width. task-2312878 closes odoo/odoo#58787 X-original-commit: b1f9057af0d38176985ecfbe125ae992422b9744 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -1043,6 +1043,9 @@ const InputUserValueWidget = UnitUserValueWidget.extend({
|
||||
var unitEl = document.createElement('span');
|
||||
unitEl.textContent = unit;
|
||||
this.containerEl.appendChild(unitEl);
|
||||
if (unit.length > 3) {
|
||||
this.el.classList.add('o_we_large_input');
|
||||
}
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user