From 5483ca977e8f26aaed8847750f4ae47ec4ff7c6b Mon Sep 17 00:00:00 2001 From: Han Zou Date: Wed, 27 May 2020 14:37:23 +1000 Subject: [PATCH] Fix cursor retains selection mod --- src/input.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/input.js b/src/input.js index 1b183a5f..9a6f4e0d 100644 --- a/src/input.js +++ b/src/input.js @@ -112,7 +112,11 @@ export function handlePaste(view, _, slice) { } export function handleMouseDown(view, startEvent) { - if (startEvent.ctrlKey || startEvent.metaKey) return + if (startEvent.ctrlKey || + startEvent.metaKey || + startEvent.which !== 1 /*not left click*/) { + return; + } let startDOMCell = domInCell(view, startEvent.target), $anchor if (startEvent.shiftKey && (view.state.selection instanceof CellSelection)) {