1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[Editor] Unselect highlights when the user click on the text layer (bug 1869767)

This commit is contained in:
Calixte Denizet 2024-01-19 20:16:55 +01:00
parent f8e3c79cb5
commit f3b76f5ae2
2 changed files with 41 additions and 0 deletions

View file

@ -350,6 +350,9 @@ class AnnotationEditorLayer {
}
#textLayerPointerDown(event) {
// Unselect all the editors in order to let the user select some text
// without being annoyed by an editor toolbar.
this.#uiManager.unselectAll();
if (event.target === this.#textLayer.div) {
const { isMac } = FeatureTest.platform;
if (event.button !== 0 || (event.ctrlKey && isMac)) {