From 3ae3d4efa025e7aa37baec2a023a694b930874fe Mon Sep 17 00:00:00 2001 From: Konstantinos Kaloutas Date: Mon, 29 Aug 2022 11:56:24 +0300 Subject: [PATCH] fix: prevent middle click paste on linux --- tldraw/packages/core/src/lib/TLApp/TLApp.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tldraw/packages/core/src/lib/TLApp/TLApp.ts b/tldraw/packages/core/src/lib/TLApp/TLApp.ts index 9110c89f99..9d8adaae75 100644 --- a/tldraw/packages/core/src/lib/TLApp/TLApp.ts +++ b/tldraw/packages/core/src/lib/TLApp/TLApp.ts @@ -851,6 +851,13 @@ export class TLApp< } readonly onPointerUp: TLEvents['pointer'] = (info, e) => { + if (!this.editingShape && e.button === 1 && this.isIn('move')) { + this.selectedTool.transition('idle', { exit: true }) + e.stopPropagation() + e.preventDefault() + return + } + if ('clientX' in e) { this.inputs.onPointerUp( [...this.viewport.getPagePoint([e.clientX, e.clientY]), 0.5],