Eliminate unnecessary setTimeout function from CKEditor's class, since it is no longer needed

This commit is contained in:
Aljaž Grilc 2024-05-22 13:36:08 +02:00
parent 21eaa95130
commit 6784df431c

View File

@ -812,18 +812,12 @@ class BesCKService extends BesTreeService {
this.clearProofing(domElement) this.clearProofing(domElement)
} }
// TODO: Research if input event or any other event that is called *after* the change is completed
// is possible with CKEditor, and move the code below this line there.
setTimeout(() => {
// Now that the text is done changing, we can correctly calculate markup position.
this.repositionAllMarkup() this.repositionAllMarkup()
// Defer grammar-checking to reduce stress on grammar-checking server. // Defer grammar-checking to reduce stress on grammar-checking server.
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.proofAll() this.proofAll()
delete this.timer delete this.timer
}, 1000) }, 1000)
}, 0)
} }
/** /**