Fix clipboard fallback selection inside dialogs (#433)

This commit is contained in:
sganggs committed 2026-10-09 17:11:03 +08:00
1 parent e738b6ce33
commit 8a8db0eb94
5 files changed
+73 -21

No files matched your search

+2 -1
View File
@@ -380,8 +380,9 @@ describe('room: copy the invite without navigator.clipboard (LAN over http, iOS)
const ta = {
style: {}, value: '',
setAttribute(k) { calls.push(['attr', k]); },
focus() { document.activeElement = ta; },
select() { calls.push(['select']); },
setSelectionRange(a, b) { calls.push(['range', a, b]); },
setSelectionRange(a, b) { this.selectionStart = a; this.selectionEnd = b; calls.push(['range', a, b]); },
remove() { calls.push(['remove']); },
};
const saved = { document: globalThis.document, secure: globalThis.isSecureContext, nav: Object.getOwnPropertyDescriptor(globalThis, 'navigator') };