Skip to content

Commit

Permalink
fix the paste operation when the cell is unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-fung-db authored and marijnh committed May 16, 2022
1 parent c955a0f commit d81a316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function handlePaste(e, cm) {
let pasted = e.clipboardData && e.clipboardData.getData("Text")
if (pasted) {
e.preventDefault()
if (!cm.isReadOnly() && !cm.options.disableInput)
if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())
runInOp(cm, () => applyTextInput(cm, pasted, 0, null, "paste"))
return true
}
Expand Down

0 comments on commit d81a316

Please sign in to comment.