mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
[Editor] Add the possibility to move the caret with the keyboard once an highlight has been made (bug 1881684)
This commit is contained in:
parent
9600c48d4f
commit
a9f47e87d5
3 changed files with 146 additions and 2 deletions
|
@ -947,7 +947,7 @@ class AnnotationEditorUIManager {
|
|||
if (!selection || selection.isCollapsed) {
|
||||
return;
|
||||
}
|
||||
const { anchorNode } = selection;
|
||||
const { anchorNode, anchorOffset, focusNode, focusOffset } = selection;
|
||||
const anchorElement =
|
||||
anchorNode.nodeType === Node.TEXT_NODE
|
||||
? anchorNode.parentElement
|
||||
|
@ -966,6 +966,10 @@ class AnnotationEditorUIManager {
|
|||
layer.createAndAddNewEditor({ x: 0, y: 0 }, false, {
|
||||
methodOfCreation,
|
||||
boxes,
|
||||
anchorNode,
|
||||
anchorOffset,
|
||||
focusNode,
|
||||
focusOffset,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue