Skip to content

Commit 98ed4f1

Browse files
authored
fix: prevent double paste issue from right-click context menu (#38)
1 parent 125e976 commit 98ed4f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/terminal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ export class Terminal implements ITerminalCore {
243243
// Setup paste event handler on textarea
244244
this.textarea.addEventListener('paste', (e: ClipboardEvent) => {
245245
e.preventDefault();
246+
e.stopPropagation(); // Prevent event from bubbling to parent (InputHandler)
246247
const text = e.clipboardData?.getData('text');
247248
if (text) {
248249
// Use the paste() method which will handle bracketed paste mode in the future

0 commit comments

Comments
 (0)