[FIX] web_editor: keep each style when editing link
Before this commit editing a link that was saved with fill styles did reset it to a different value and even changed the 'type' to 'link'. After this commit re-editing the link works for each style. task-2629461 closes odoo/odoo#75512 X-original-commit: 4f6cc912260c5b5689b0e87644ad119ef5a1389c Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
This commit is contained in:
@@ -109,7 +109,7 @@ const Link = Widget.extend({
|
||||
const subValues = value.split(',');
|
||||
let subActive = true;
|
||||
for (let subValue of subValues) {
|
||||
const classPrefix = new RegExp('(^|btn-| |btn-outline-)' + subValue);
|
||||
const classPrefix = new RegExp('(^|btn-| |btn-outline-|btn-fill-)' + subValue);
|
||||
subActive = subActive && classPrefix.test(this.data.iniClassName);
|
||||
}
|
||||
active = subActive;
|
||||
|
||||
Reference in New Issue
Block a user