fix(grid): preserve native clipboard in table info

This commit is contained in:
t8y2 committed 2026-07-26 13:47:46 +08:00
1 parent f186857322
commit f18030df72
2 files changed
+22 -1

No files matched your search

@@ -0,0 +1,14 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const dataGridSource = readFileSync(new URL("../DataGrid.vue", import.meta.url), "utf8");
describe("DataGrid native clipboard regions", () => {
it("keeps table info text selection out of grid copy shortcuts", () => {
const drawerStart = dataGridSource.indexOf('<div v-if="showTableInfo"');
const drawerTagEnd = dataGridSource.indexOf(">", drawerStart);
expect(drawerStart).toBeGreaterThanOrEqual(0);
expect(dataGridSource.slice(drawerStart, drawerTagEnd)).toContain("data-native-clipboard");
});
});