Text becomes blank if DOM elements are added or removed around tinymce instance
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Start with the provided Vue component example and working CodePen, then reproduce the issue by toggling the checkbox while observing the TinyMCE editor. Investigate how the TinyMCE Vue component handles its editor content when Vue moves its containing DOM element. Done means the editor text remains visible and editable after the surrounding paragraphs are added or removed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is the current behavior?
Text becomes blank and is not editable if parent siblings in DOM tree are removed or added.
**Please provide the steps to reproduce and if possible a minimal demo of the problem
<script>
import TinyMce from '@tinymce/tinymce-vue';
export default {
components: {
TinyMce,
},
data: function() {
return {
text: 'text',
instructionsVisible: false,
};
},
};
</script>
<template lang="html">
<div>
<label><input type="checkbox" v-model="instructionsVisible" /> Click me</label>
<p v-if="instructionsVisible">Lorem ipsum dolor sit amet</p>
<div><tiny-mce v-model="text"/></div>
<p v-if="instructionsVisible">Lorem ipsum dolor sit amet</p>
</div>
</template>
Working demo: https://codepen.io/lwd8cmd/pen/rNWbXYx
Bug is probably caused by Vue moving div block containing tiny-mce editor around in DOM tree if p-tags are added. Vue doesn't keep content in another document (editable text held in iframe) if div block is moved to another location in DOM.
Call stack:
- Vue._update
- patch - update DOM structure
- patchVnode - patch existing root node (root div)
- updateChildren - update root div children (remove p tags, move div tag containing tiny-mce component)
- insertBefore - move div containing tiny-mce component to another location
What is the expected behavior?
Text editor content shouldn't change, text should stay editable.
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-vue?
Bug occurred in Tinymce-vue 3.0 and 3.2.8. Tested using Chrome 88, but bug should be browser-agnostic.
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 217
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tinymce/tinymce-vue
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
tinymce/tinymce-vue#482 · 7 commenti · 2 reazioni ·
-
expose editor instanceApertaGitHub status: escalated
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
tinymce/tinymce-vue#350 · 5 commenti · 1 reazione ·
-
VueX: integrations/vue.mdApertaGitHub status: escalated
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
tinymce/tinymce-vue#266 · 5 commenti ·
-
Workaround for new Boostrap-vue when editor became zombieForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertastatus: escalated
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
tinymce/tinymce-vue#131 · 9 commenti · 5 reazioni ·
Tutte le issue di tinymce/tinymce-vue
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
zabuton-app/meguri#875 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
iruzen-dono/workless#117 ·
I maintainer di solito rispondono entro 1 giorno
-
area:api area:web wave wave:trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
vetro-protocol/vetro-monorepo#1321 ·
I maintainer di solito rispondono entro 1 giorno