[FIX] web_editor: align icon to the right
When replacing an image by a pictogram, the classes of the previous media are copied to the new icon's `<span>`. This potentially includes the `w-100` class which prevents the alignment from behaving correctly. This commit removes the `w-100` class if it exists. Steps to reproduce: - Drop a "Media List" block - Replace first image by pictogram. - Align icon to the right. => Icon was displayed aligned to the left. task-2829971 (was task-2729177) closes odoo/odoo#95287 X-original-commit: https://github.com/odoo/odoo/commit/8f71a3c55dcaae738fbb673266aa400b4c4a1fa4 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -252,9 +252,11 @@ export class ImageSelector extends FileSelector {
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
ImageSelector.mediaSpecificClasses = ['img', 'img-fluid', 'o_we_custom_image'];
|
||||
ImageSelector.mediaExtraClasses = [
|
||||
'rounded-circle', 'rounded', 'thumbnail', 'shadow', /^img-\S+$/,
|
||||
'w-25', 'w-50', 'w-75', 'w-100',
|
||||
];
|
||||
ImageSelector.tagNames = ['IMG'];
|
||||
ImageSelector.attachmentsListTemplate = 'web_editor.ImagesListTemplate';
|
||||
|
||||
Reference in New Issue
Block a user