mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[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:
parent
101e8efad7
commit
bb19cf9b64
3 changed files with 92 additions and 5 deletions
|
@ -329,6 +329,12 @@ const PDFViewerApplication = {
|
|||
params.get("highlighteditorcolors")
|
||||
);
|
||||
}
|
||||
if (params.has("supportscaretbrowsingmode")) {
|
||||
AppOptions.set(
|
||||
"supportsCaretBrowsingMode",
|
||||
params.get("supportscaretbrowsingmode") === "true"
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue