Hide popup and remove highlighted rects after input

This commit is contained in:
Aljaž Grilc 2025-02-25 09:35:34 +01:00
parent cc88584802
commit 00cb5aecd4

View File

@ -1024,7 +1024,8 @@ class BesDOMService extends BesTreeService {
onInput() {
// Now that the text is done changing, we can correctly calculate markup position.
this.repositionAllMarkup()
BesPopup.hide()
this.highlightedRects.forEach(h => h.remove())
// Defer grammar-checking to reduce stress on grammar-checking server.
this.scheduleProofing(1000)
}
@ -1728,7 +1729,8 @@ class BesDOMPlainTextService extends BesPlainTextService {
// Now that the text is done changing, we can correctly calculate markup position.
this.repositionAllMarkup()
BesPopup.hide()
this.highlightedRects.forEach(h => h.remove())
// Defer grammar-checking to reduce stress on grammar-checking server.
this.scheduleProofing(1000)
}