fix(overlay): treat Hachidori popup host as a lookup target for keys

- Match the Hachidori shadow-root host alongside the Yomitan popup host when routing keyboard events
- Update the keyboard test stub to use HACHIDORI_HOST_SELECTOR
This commit is contained in:
sudacode committed 2026-10-04 00:59:04 -07:00
1 parent 37d3f5e03e
commit 170dbbb74c
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ export function createKeyboardHandlers(
if (ctx.dom.subtitleContainer.contains(target)) return true;
if (isYomitanPopupIframe(target)) return true;
// Hachidori's popup lives in a shadow root, so its events arrive retargeted to the host.
if (target.closest(YOMITAN_POPUP_HOST_SELECTOR)) return true;
if (target.closest(`${YOMITAN_POPUP_HOST_SELECTOR}, ${HACHIDORI_HOST_SELECTOR}`)) return true;
if (target.closest && target.closest('iframe.yomitan-popup, iframe[id^="yomitan-popup"]'))
return true;
return false;