diff --git a/packages/frontend-core/src/components/grid/controls/ClipboardHandler.svelte b/packages/frontend-core/src/components/grid/controls/ClipboardHandler.svelte index 142f6419ad..774767a75e 100644 --- a/packages/frontend-core/src/components/grid/controls/ClipboardHandler.svelte +++ b/packages/frontend-core/src/components/grid/controls/ClipboardHandler.svelte @@ -2,9 +2,16 @@ import { Modal, ModalContent, ProgressBar } from "@budibase/bbui" import { getContext, onMount } from "svelte" import { sleep } from "../../../utils/utils" + import { get } from "svelte/store" - const { clipboard, subscribe, copyAllowed, pasteAllowed, selectedCellCount } = - getContext("grid") + const { + clipboard, + subscribe, + copyAllowed, + pasteAllowed, + selectedCellCount, + focusedCellAPI, + } = getContext("grid") const duration = 260 let modal @@ -19,10 +26,15 @@ } const handlePasteRequest = async () => { + // If a cell is active then let the native paste action take over + if (get(focusedCellAPI)?.isActive()) { + return + } progressPercentage = 0 if (!$pasteAllowed) { return } + // Prompt if paste will update multiple cells const multiCellPaste = $selectedCellCount > 1 const prompt = $clipboard.multiCellCopy || multiCellPaste diff --git a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte index 27273fb598..b04870e521 100644 --- a/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte +++ b/packages/frontend-core/src/components/grid/overlays/KeyboardManager.svelte @@ -58,7 +58,7 @@ case "c": return handle(() => dispatch("copy")) case "v": - return handle(() => dispatch("paste")) + return dispatch("paste") case "Enter": return handle(() => { if ($config.canAddRows) {