Skip to content

Commit 877e1b2

Browse files
committed
Merge remote-tracking branch 'origin/4.5'
2 parents 37f7ea2 + c223ef0 commit 877e1b2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/bundle/Resources/public/js/CKEditor/custom-attributes/custom-attributes-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class IbexaCustomAttributesCommand extends Command {
2828
const hasOwnCustomClasses =
2929
elementCustomClassesConfig &&
3030
selectedCustomClasses
31-
.split()
31+
.split(' ')
3232
.every((selectedCustomClass) => elementCustomClassesConfig.choices.includes(selectedCustomClass));
3333

3434
if (elementName === modelElement.name || hasOwnCustomClasses) {

src/bundle/Resources/public/js/CKEditor/custom-attributes/ui/custom-attributes-form-view.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ class IbexaCustomAttributesFormView extends View {
209209
addListToDropdown(labeledDropdown.fieldView, itemsList);
210210

211211
this.listenTo(labeledDropdown.fieldView, 'execute', (event) => {
212-
const value = config.multiple
213-
? [...new Set([...labeledDropdown.fieldView.element.value.split(','), event.source.value])].join(',')
214-
: event.source.value;
212+
const alreadySelectedValues = labeledDropdown.fieldView.element.value ? labeledDropdown.fieldView.element.value.split(' ') : [];
213+
const value = config.multiple ? [...new Set([...alreadySelectedValues, event.source.value])].join(' ') : event.source.value;
215214

216215
labeledDropdown.fieldView.buttonView.set({
217216
label: value,

src/bundle/Resources/public/scss/_balloon-form.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
.ck-button.ck-dropdown__button {
2626
.ck-button__label {
2727
width: calculateRem(198px);
28+
display: inline-block;
2829
}
2930
}
3031
}

0 commit comments

Comments
 (0)