diff --git a/html/src/components/terminal/index.tsx b/html/src/components/terminal/index.tsx index f582083..42660ec 100644 --- a/html/src/components/terminal/index.tsx +++ b/html/src/components/terminal/index.tsx @@ -141,6 +141,7 @@ export class Xterm extends Component { terminal.onResize(this.onTerminalResize); if (document.queryCommandSupported && document.queryCommandSupported('copy')) { terminal.onSelectionChange(() => { + if (terminal.getSelection() === '') return; overlayAddon.showOverlay('\u2702', 200); document.execCommand('copy'); }); diff --git a/src/index.html b/src/index.html index 2ae309a..d5c6a3d 100644 --- a/src/index.html +++ b/src/index.html @@ -1 +1 @@ -ttyd - Terminal \ No newline at end of file +ttyd - Terminal \ No newline at end of file