Merge pull request #1473 from janvi01/pasteFilterBug

fix: while pasting updates the value of the cell if highlighted
This commit is contained in:
Shams
2023-11-06 20:51:01 -08:00
committed by GitHub

View File

@@ -165,6 +165,10 @@ export function useMenuAction(
async (e?: ClipboardEvent) => {
try {
if (!selectedCell || !selectedCol) return;
// checks which element has focus, if it is not the gridcell it won't paste the copied content inside the gridcell
if (document.activeElement?.role !== "gridcell") return;
let text: string;
// Firefox doesn't allow for reading clipboard data, hence the workaround
if (navigator.userAgent.includes("Firefox")) {