Skip to content

Commit

Permalink
Deskop: Fixes flickering when switching notes while the Note Search B…
Browse files Browse the repository at this point in the history
…ar is visible (#5548)
  • Loading branch information
ken1kob authored Nov 9, 2021
1 parent 7b3ad32 commit 200ba85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/app-desktop/gui/note-viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@
const markJsHackMarker_ = ' ';
for (let i = 0; i < elements.length; i++) {
if (!type) {
elements[i].innerHTML = elements[i].innerHTML + markJsHackMarker_;
elements[i].insertAdjacentHTML('beforeend', markJsHackMarker_);
} else if (type === 'insertBefore') {
elements[i].insertAdjacentHTML('beforeBegin', markJsHackMarker_);
}
}
}

prepareElementsForMarkJs(document.getElementsByTagName('p'));
prepareElementsForMarkJs(document.getElementsByTagName('div'));
prepareElementsForMarkJs(document.getElementsByTagName('br'), 'insertBefore');
prepareElementsForMarkJs(contentElement.getElementsByTagName('p'));
prepareElementsForMarkJs(contentElement.getElementsByTagName('div'));
prepareElementsForMarkJs(contentElement.getElementsByTagName('br'), 'insertBefore');
markJsHackMarkerInserted_ = true;
}

Expand Down

0 comments on commit 200ba85

Please sign in to comment.