Home
last modified time | relevance | path

Searched hist:"50325813 c370b7edc1061ded0adc1a54b9c92cb7" (Results 1 – 1 of 1) sorted by relevance

/plugin/annotations/
H A Dscript.js50325813c370b7edc1061ded0adc1a54b9c92cb7 Sat May 23 05:03:53 UTC 2026 tracker-user <82045103+tracker-user@users.noreply.github.com> Fix anchor capture when starting a new annotation

Browsers collapse the text selection before the tooltip button's click
handler runs, so captureAnchor() saw an empty selection and new
annotations were silently lost. Capture the anchor on the button's
mousedown -- while the selection is still intact -- into a module-level
_pendingAnchor that the click handler consumes. Don't replace an
already-showing tooltip (which would orphan the button mid-click), and
keep the new-annotation form alive through the mouseup that follows the
click instead of tearing it down with the tooltip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>