[Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)

The function caretPositionFromPoint return the position within the last visible element
and sometimes there are some elements on top of the ones in the text layer.
So the idea is to hide the visible elements which aren't in the text layer in order
to get the right caret position.
This commit is contained in:
Calixte Denizet 2024-02-23 14:55:54 +01:00
parent 101e8efad7
commit bb19cf9b64
3 changed files with 92 additions and 5 deletions

View file

@ -329,6 +329,12 @@ const PDFViewerApplication = {
params.get("highlighteditorcolors")
);
}
if (params.has("supportscaretbrowsingmode")) {
AppOptions.set(
"supportsCaretBrowsingMode",
params.get("supportscaretbrowsingmode") === "true"
);
}
}
},