mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: support collaboration in bound text (#4573)
* fix: support collaboration in bounded text * align implementation irrespective of collab/submit * don't wrap when submitted * fix * tests: exit editor via ESCAPE instead to remove async hacks * simplify and remove dead comment * remove mutating coords in submit since its taken care in updateWysiwygStyle Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
0850ab0dd0
commit
24bf4cb5fb
6 changed files with 56 additions and 82 deletions
|
@ -158,11 +158,8 @@ describe("element binding", () => {
|
|||
|
||||
expect(editor).not.toBe(null);
|
||||
|
||||
// we defer binding blur event on wysiwyg, hence wait a bit
|
||||
await new Promise((r) => setTimeout(r, 30));
|
||||
|
||||
fireEvent.change(editor, { target: { value: "" } });
|
||||
editor.blur();
|
||||
fireEvent.keyDown(editor, { key: KEYS.ESCAPE });
|
||||
|
||||
expect(
|
||||
document.querySelector(".excalidraw-textEditorContainer > textarea"),
|
||||
|
@ -202,11 +199,8 @@ describe("element binding", () => {
|
|||
|
||||
expect(editor).not.toBe(null);
|
||||
|
||||
// we defer binding blur event on wysiwyg, hence wait a bit
|
||||
await new Promise((r) => setTimeout(r, 30));
|
||||
|
||||
fireEvent.change(editor, { target: { value: "asdasdasdasdas" } });
|
||||
editor.blur();
|
||||
fireEvent.keyDown(editor, { key: KEYS.ESCAPE });
|
||||
|
||||
expect(
|
||||
document.querySelector(".excalidraw-textEditorContainer > textarea"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue