feat(sidebar): add dialogue selection and copying (#238)

This commit is contained in:
2026-09-07 14:03:54 -07:00
committed by GitHub
parent c14c690875
commit 1e5d7747b4
24 changed files with 624 additions and 3 deletions
+4 -1
View File
@@ -436,7 +436,10 @@ export function createKeyboardHandlers(
}
function clearNativeSubtitleSelection(): void {
window.getSelection()?.removeAllRanges();
const selection = window.getSelection();
if (!selection?.anchorNode || ctx.dom.subtitleRoot.contains(selection.anchorNode)) {
selection?.removeAllRanges();
}
ctx.dom.subtitleRoot.classList.remove('has-selection');
}