Merge pull request #3464 from primefaces/issue-3097

Editor: color format button rendering issue fixed
pull/3509/head
Bahadır 2023-01-09 13:56:48 +03:00 committed by GitHub
commit b16870fb6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<button class="ql-italic" type="button"></button> <button class="ql-italic" type="button"></button>
<button class="ql-underline" type="button"></button> <button class="ql-underline" type="button"></button>
</span> </span>
<span class="ql-formats"> <span :key="reRenderColorKey" class="ql-formats">
<select class="ql-color"></select> <select class="ql-color"></select>
<select class="ql-background"></select> <select class="ql-background"></select>
</span> </span>
@ -69,10 +69,16 @@ export default {
editorStyle: null, editorStyle: null,
modules: null modules: null
}, },
data() {
return {
reRenderColorKey: 0
};
},
quill: null, quill: null,
watch: { watch: {
modelValue(newValue, oldValue) { modelValue(newValue, oldValue) {
if (newValue !== oldValue && this.quill && !this.quill.hasFocus()) { if (newValue !== oldValue && this.quill && !this.quill.hasFocus()) {
this.reRenderColorKey++;
this.renderValue(newValue); this.renderValue(newValue);
} }
} }