[Editor] Improve the accessibility of the highlight editor (bug 1881743)

This commit is contained in:
Calixte Denizet 2024-03-11 14:05:28 +01:00
parent b14f696071
commit f676c2c0c8
6 changed files with 29 additions and 0 deletions

View file

@ -952,6 +952,7 @@ class AnnotationEditorUIManager {
return;
}
const { anchorNode, anchorOffset, focusNode, focusOffset } = selection;
const text = selection.toString();
const anchorElement =
anchorNode.nodeType === Node.TEXT_NODE
? anchorNode.parentElement
@ -974,6 +975,7 @@ class AnnotationEditorUIManager {
anchorOffset,
focusNode,
focusOffset,
text,
});
break;
}