Fix rendering mistakes in textarea instances following corrections
This commit is contained in:
parent
2192845cae
commit
f6ee559065
@ -300,6 +300,7 @@ class BesService {
|
||||
matches: matches
|
||||
})
|
||||
|
||||
if (!this.textAreaService) {
|
||||
const dataToChange = this
|
||||
let observer = new MutationObserver(function (mutations) {
|
||||
mutations.forEach(mutation => {
|
||||
@ -313,6 +314,7 @@ class BesService {
|
||||
})
|
||||
observer.observe(el, { characterData: true, subtree: true })
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears given block element as not grammar-proofed and removes all its grammar mistakes.
|
||||
@ -322,6 +324,7 @@ class BesService {
|
||||
clearMistakeMarkup(el) {
|
||||
let child = this.children?.find(child => child.element === el)
|
||||
if (!child) return
|
||||
if (this.textAreaService) child.isProofed = false
|
||||
child.matches.forEach(match => {
|
||||
if (match?.highlights) {
|
||||
match.highlights.forEach(h => h.remove())
|
||||
|
Loading…
x
Reference in New Issue
Block a user