Prefer files when handling paste event

This commit is contained in:
trevor-signal 2024-09-22 19:48:29 -04:00 committed by GitHub
parent a6a838a673
commit 1020857c78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,11 +56,14 @@ export class SignalClipboard {
const signal = event.clipboardData.getData('text/signal');
const clipboardContainsFiles = event.clipboardData.files?.length > 0;
if (!clipboardContainsFiles) {
event.preventDefault();
event.stopPropagation();
if (clipboardContainsFiles) {
return;
}
event.preventDefault();
event.stopPropagation();
if (selection == null) {
return;
}