mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-19 05:16:27 -07:00
feat(sidebar): add dialogue selection and copying (#238)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user