Move clipboard to browser
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminalOptions
|
||||
import { IRenderer, CharacterJoinerHandler } from 'browser/renderer/Types';
|
||||
import { CompositionHelper } from 'browser/input/CompositionHelper';
|
||||
import { Viewport } from './Viewport';
|
||||
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './Clipboard';
|
||||
import { rightClickHandler, moveTextAreaUnderMouseCursor, pasteHandler, copyHandler } from './browser/Clipboard';
|
||||
import { C0 } from 'common/data/EscapeSequences';
|
||||
import { InputHandler } from './InputHandler';
|
||||
import { Renderer } from './renderer/Renderer';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { assert } from 'chai';
|
||||
import * as Clipboard from './Clipboard';
|
||||
import * as Clipboard from 'browser/Clipboard';
|
||||
|
||||
describe('evaluatePastedTextProcessing', () => {
|
||||
it('should replace carriage return and/or line feed with carriage return', () => {
|
||||
@@ -29,7 +29,9 @@ export function bracketTextForPaste(text: string, bracketedPasteMode: boolean):
|
||||
* @param ev The original copy event to be handled
|
||||
*/
|
||||
export function copyHandler(ev: ClipboardEvent, selectionService: ISelectionService): void {
|
||||
ev.clipboardData.setData('text/plain', selectionService.selectionText);
|
||||
if (ev.clipboardData) {
|
||||
ev.clipboardData.setData('text/plain', selectionService.selectionText);
|
||||
}
|
||||
// Prevent or the original text will be copied.
|
||||
ev.preventDefault();
|
||||
}
|
||||
Reference in New Issue
Block a user