mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 17:36:12 +02:00
🐛 Fix problem when pasting text (#5671)
This commit is contained in:
parent
2ef22ecd08
commit
7458a35f31
3 changed files with 16 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
- Fix errors from editable select on measures menu [Taiga #9888](https://tree.taiga.io/project/penpot/issue/9888)
|
- Fix errors from editable select on measures menu [Taiga #9888](https://tree.taiga.io/project/penpot/issue/9888)
|
||||||
- Fix exception on importing some templates from templates slider
|
- Fix exception on importing some templates from templates slider
|
||||||
- Consolidate adding share button to workspace
|
- Consolidate adding share button to workspace
|
||||||
|
- Fix problem when pasting text [Taiga #9929](https://tree.taiga.io/project/penpot/issue/9929)
|
||||||
|
|
||||||
## 2.4.2
|
## 2.4.2
|
||||||
|
|
||||||
|
|
|
@ -225,3 +225,16 @@ test("Bug 9066 - Problem with grid layout", async ({ page }) => {
|
||||||
page.getByTestId("children-6ad3e6b9-c5a0-80cf-8005-283bbe378bcb"),
|
page.getByTestId("children-6ad3e6b9-c5a0-80cf-8005-283bbe378bcb"),
|
||||||
).toHaveText(["CBCDEF"]);
|
).toHaveText(["CBCDEF"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("[Taiga #9929] Paste text in workspace", async ({ page, context }) => {
|
||||||
|
const workspacePage = new WorkspacePage(page);
|
||||||
|
await workspacePage.setupEmptyFile(page);
|
||||||
|
await workspacePage.goToWorkspace();
|
||||||
|
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
|
||||||
|
await page.evaluate(() => navigator.clipboard.writeText("Lorem ipsum dolor"));
|
||||||
|
await workspacePage.viewport.click({ button: "right" });
|
||||||
|
await page.getByText("PasteCtrlV").click();
|
||||||
|
await workspacePage.viewport
|
||||||
|
.getByRole("textbox")
|
||||||
|
.getByText("Lorem ipsum dolor");
|
||||||
|
});
|
||||||
|
|
|
@ -1722,10 +1722,10 @@
|
||||||
(coll? transit-data)
|
(coll? transit-data)
|
||||||
(rx/of (paste-transit (assoc transit-data :in-viewport in-viewport?)))
|
(rx/of (paste-transit (assoc transit-data :in-viewport in-viewport?)))
|
||||||
|
|
||||||
(string? html-data)
|
(and (string? html-data) (d/not-empty? html-data))
|
||||||
(rx/of (paste-html-text html-data text-data))
|
(rx/of (paste-html-text html-data text-data))
|
||||||
|
|
||||||
(string? text-data)
|
(and (string? text-data) (d/not-empty? text-data))
|
||||||
(rx/of (paste-text text-data))
|
(rx/of (paste-text text-data))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue