From bf79894f4acd97a84371786871843a423e4990f2 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 29 Mar 2024 15:32:15 +0100 Subject: [PATCH 1/3] Fix cell copying on Firefox fix #2856 --- frontend/components/Editor.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/components/Editor.js b/frontend/components/Editor.js index 79795111aa..efe48c6bc5 100644 --- a/frontend/components/Editor.js +++ b/frontend/components/Editor.js @@ -1320,10 +1320,14 @@ patch: ${JSON.stringify( if (!in_textarea_or_input()) { const serialized = this.serialize_selected() if (serialized) { - navigator.clipboard.writeText(serialized).catch((err) => { - console.error("Error copying cells", e, err) - alert(`Error copying cells: ${err?.message ?? err}`) - }) + e.preventDefault() + // wait one frame to get transient user activation + requestAnimationFrame(() => + navigator.clipboard.writeText(serialized).catch((err) => { + console.error("Error copying cells", e, err, navigator.userActivation) + alert(`Error copying cells: ${err?.message ?? err}`) + }) + ) } } }) From 17c534ab91faaa5f738d815d6150b45c112152c3 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 29 Mar 2024 15:50:10 +0100 Subject: [PATCH 2/3] Update TypeScriptCheck.yml --- .github/workflows/TypeScriptCheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TypeScriptCheck.yml b/.github/workflows/TypeScriptCheck.yml index fce836337d..e9119e5871 100644 --- a/.github/workflows/TypeScriptCheck.yml +++ b/.github/workflows/TypeScriptCheck.yml @@ -24,9 +24,9 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: "18.x" + node-version: "21.x" - - run: npm install typescript@5.0.4 -g + - run: npm install typescript@5.4.5 -g - run: npm install working-directory: frontend From 1d59dfe219975b75f0697833715ee4833db4dbd9 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Fri, 29 Mar 2024 16:08:34 +0100 Subject: [PATCH 3/3] Update TypeScriptCheck.yml --- .github/workflows/TypeScriptCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TypeScriptCheck.yml b/.github/workflows/TypeScriptCheck.yml index e9119e5871..83c99083be 100644 --- a/.github/workflows/TypeScriptCheck.yml +++ b/.github/workflows/TypeScriptCheck.yml @@ -26,7 +26,7 @@ jobs: with: node-version: "21.x" - - run: npm install typescript@5.4.5 -g + - run: npm install typescript@5.4.3 -g - run: npm install working-directory: frontend