Skip to content

Commit

Permalink
Prevent annotation popover when selecting
Browse files Browse the repository at this point in the history
Fixes #1441
  • Loading branch information
johnfactotum committed Nov 30, 2024
1 parent cc3059c commit 40b65e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reader/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ class Reader {
const sel = doc.getSelection()
const range = getSelectionRange(sel)
if (!range) return
// prevent click event
doc.addEventListener('click', e => e.stopPropagation(), { capture: true, once: true })
const pos = getPosition(range)
const value = this.view.getCFI(index, range)
const lang = getLang(range.commonAncestorContainer)
Expand Down

0 comments on commit 40b65e1

Please sign in to comment.