1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Desktop: Fixes #3904, Fixes #3973: Fixed inconsistent note list state when using search

This commit is contained in:
Laurent Cozic
2020-11-09 12:07:37 +00:00
parent ca8b05631a
commit d0ec598ee4
6 changed files with 84 additions and 73 deletions

View File

@@ -7,6 +7,8 @@ const Resource = require('@joplin/lib/models/Resource');
// handler on the webContent. This function will return null if the point is
// not within the TinyMCE editor.
function contextMenuElement(editor:any, x:number, y:number) {
if (!editor || !editor.getDoc()) return null;
const iframes = document.getElementsByClassName('tox-edit-area__iframe');
if (!iframes.length) return null;
@@ -15,7 +17,6 @@ function contextMenuElement(editor:any, x:number, y:number) {
if (iframeRect.x < x && iframeRect.y < y && iframeRect.right > x && iframeRect.bottom > y) {
const relativeX = x - iframeRect.x;
const relativeY = y - iframeRect.y;
return editor.getDoc().elementFromPoint(relativeX, relativeY);
}