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:
Aakansha Doshi 2022-01-17 17:35:35 +05:30 committed by GitHub
parent 0850ab0dd0
commit 24bf4cb5fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 82 deletions

View file

@ -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"),