close: Clear previous highlights before displaying popup corrections
Closes #2
This commit is contained in:
parent
ac7fe2b90e
commit
14e4893b8d
@ -428,6 +428,9 @@ class BesService {
|
||||
*/
|
||||
popupCorrectionPanel(el, match, source, highlightEl) {
|
||||
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.appendReplacements(el, match, this, this.isContentEditable())
|
||||
popup.show(source.clientX, source.clientY, highlightEl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user