Skip to content

Commit e609a09

Browse files
committed
fix(NcRichContenteditable): move DOM patch to initialize method
- it's a patch for new Tribute() and should be coupled with it - upstream fix is released but not published on npm Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 69d18d6 commit e609a09

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/NcRichContenteditable/NcRichContenteditable.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,6 @@ export default {
602602
603603
// Update default value
604604
this.updateContent(this.model)
605-
606-
// Tribute.js library ensures that `el.contentEditable = true` when attaching to element.
607-
// This overwrites the template binding.
608-
// Set the contenteditable attribute to actual value afterward
609-
this.$refs.contenteditable.contentEditable = this.contenteditableAttributeValue
610605
},
611606
612607
beforeDestroy() {
@@ -737,6 +732,12 @@ export default {
737732
menuContainer,
738733
})
739734
this.tribute.attach(this.$refs.contenteditable)
735+
736+
// Tribute.js library v5.1.3 ensures that `el.contentEditable = true` when attaching to element.
737+
// This overwrites the template binding.
738+
// Set the contenteditable attribute to actual value afterward
739+
// TODO remove when Tribute.js library v5.1.4 is published on npm (or fork it)
740+
this.$refs.contenteditable.contentEditable = this.contenteditableAttributeValue
740741
},
741742
742743
getLink(item) {

0 commit comments

Comments
 (0)