mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Fix cut/copy and paste from composer
This commit is contained in:
@@ -187,7 +187,7 @@ import { setBatchingStrategy } from './util/messageBatcher';
|
||||
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration';
|
||||
import { makeLookup } from './util/makeLookup';
|
||||
import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts';
|
||||
import { handleCopyEvent } from './quill/signal-clipboard/util';
|
||||
import { createEventHandler } from './quill/signal-clipboard/util';
|
||||
|
||||
export function isOverHourIntoPast(timestamp: number): boolean {
|
||||
return isNumber(timestamp) && isOlderThan(timestamp, HOUR);
|
||||
@@ -551,7 +551,14 @@ export async function startApp(): Promise<void> {
|
||||
);
|
||||
|
||||
// Intercept clipboard copies to add our custom text/signal data
|
||||
document.addEventListener('copy', handleCopyEvent);
|
||||
document.addEventListener(
|
||||
'copy',
|
||||
createEventHandler({ deleteSelection: false })
|
||||
);
|
||||
document.addEventListener(
|
||||
'cut',
|
||||
createEventHandler({ deleteSelection: true })
|
||||
);
|
||||
|
||||
startInteractionMode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user