close: Clear previous highlights before displaying popup corrections
Closes #2
This commit is contained in:
@@ -428,6 +428,9 @@ class BesService {
|
|||||||
*/
|
*/
|
||||||
popupCorrectionPanel(el, match, source, highlightEl) {
|
popupCorrectionPanel(el, match, source, highlightEl) {
|
||||||
const popup = document.querySelector('bes-popup-el')
|
const popup = document.querySelector('bes-popup-el')
|
||||||
|
document.querySelectorAll('.bes-mistake-highlight-selected').forEach(el => {
|
||||||
|
el.classList.remove('bes-mistake-highlight-selected')
|
||||||
|
})
|
||||||
popup.changeMessage(match.match.message)
|
popup.changeMessage(match.match.message)
|
||||||
popup.appendReplacements(el, match, this, this.isContentEditable())
|
popup.appendReplacements(el, match, this, this.isContentEditable())
|
||||||
popup.show(source.clientX, source.clientY, highlightEl)
|
popup.show(source.clientX, source.clientY, highlightEl)
|
||||||
|
Reference in New Issue
Block a user