Skip to content

Commit

Permalink
Merge pull request #7097 from J-Michalek/fix/editor-broken-toolbar-bu…
Browse files Browse the repository at this point in the history
…ttons

fix(editor): broken color buttons after modelValue update
  • Loading branch information
tugcekucukoglu authored Jan 15, 2025
2 parents b9a8efc + 02c7af1 commit b01abbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/primevue/src/dialog/Dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export default {
this.bindDocumentDragEndListener();
}
if (this.closeOnEscape) {
if (this.closeOnEscape && this.closable) {
this.bindDocumentKeyDownListener();
}
},
Expand Down
8 changes: 1 addition & 7 deletions packages/primevue/src/editor/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<button class="ql-italic" type="button" v-bind="ptm('italic')"></button>
<button class="ql-underline" type="button" v-bind="ptm('underline')"></button>
</span>
<span :key="reRenderColorKey" class="ql-formats" v-bind="ptm('formats')">
<span class="ql-formats" v-bind="ptm('formats')">
<select class="ql-color" v-bind="ptm('color')"></select>
<select class="ql-background" v-bind="ptm('background')"></select>
</span>
Expand Down Expand Up @@ -64,16 +64,10 @@ export default {
extends: BaseEditor,
inheritAttrs: false,
emits: ['text-change', 'selection-change', 'load'],
data() {
return {
reRenderColorKey: 0
};
},
quill: null,
watch: {
modelValue(newValue, oldValue) {
if (newValue !== oldValue && this.quill && !this.quill.hasFocus()) {
this.reRenderColorKey++;
this.renderValue(newValue);
}
},
Expand Down

0 comments on commit b01abbf

Please sign in to comment.