fix(suggestion): paste after the shortcut keys are released and keep typing detection stable

Ctrl+Alt+Enter pasted while Ctrl+Alt were still down, so the target app got
Ctrl+Alt+V; accepting now closes the panel and waits for the modifiers to be
released. Candidates are accepted on pointer press because the list is
redrawn as new candidates stream in, which swallowed clicks.

The typing gate identified the focused field by its bounds, so chat boxes
that grow while typing looked like a new field on every keystroke and were
reported as "not typing". Fields are now keyed by window, control type and
name, and a mouse click re-baselines the text instead. The decision log
includes both gate values.

The live-caption model selector moves to the caption section of the General
tab, next to the other caption settings.
This commit is contained in:
Yun Chan 2026-09-24 22:01:10 +09:00
parent 4b0f685941
commit da0da98285
8 changed files with 144 additions and 55 deletions

View file

@ -83,7 +83,9 @@
)
item.type = 'button'
item.setAttribute('data-index', String(i))
item.addEventListener('click', onItemClick)
// click 이 아니라 누르는 순간 수락한다 — 후보가 1초마다 추가되며 목록을 다시 그려,
// 누르고 떼는 사이에 버튼이 바뀌면 click 이 성립하지 않았다(실측: 클릭 수락 무반응).
item.addEventListener('pointerdown', onItemPress)
candidatesContainer.appendChild(item)
}
@ -179,7 +181,9 @@
provenanceContainer.textContent = sourceLabel || ''
}
function onItemClick(event) {
function onItemPress(event) {
if (event.button !== 0) return
event.preventDefault()
var target = event.currentTarget
var index = Number(target.getAttribute('data-index'))
if (!window.popupAPI) return