|
@@ -43,7 +43,7 @@ export const keywordReminderInit = () => {
|
|
|
export const listenerKeywordInput = debounce(function() {
|
|
|
let inputBox = getInputBox();
|
|
|
if(inputBox) {
|
|
|
- inputBox.oninput = function () {
|
|
|
+ inputBox.onkeyup = function () {
|
|
|
highlightKeyword();
|
|
|
}
|
|
|
}
|
|
@@ -67,6 +67,7 @@ export const highlightKeyword = () => {
|
|
|
if(checkHasTag({keyword, startPos, endPos, rowIndex: j})) {
|
|
|
continue;
|
|
|
}
|
|
|
+ removeTag({rowIndex: j, keyword})
|
|
|
|
|
|
lastRange = window.getSelection().getRangeAt(0)
|
|
|
|
|
@@ -98,12 +99,15 @@ export const highlightKeyword = () => {
|
|
|
let top = rectDom.top - inputBoxRect.top + 2;
|
|
|
|
|
|
let cssText = `left: ${left}px;top: ${top}px;width: ${rectDom.width}px;height: ${rectDom.height}px;`;
|
|
|
- addHighlightDom({cssText, rowIndex: j, keyword})
|
|
|
+ addHighlightDom({cssText, rowIndex: j, keyword});
|
|
|
} else {
|
|
|
removeTag({rowIndex: j, keyword})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ document.getElementById("denet-keword-highlight-wrapper").innerHTML = '';
|
|
|
+ tagData = [];
|
|
|
}
|
|
|
}
|
|
|
}
|