1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Fix regression around pasting links (#8537)

* Fix regression around pasting links

* Add tests
This commit is contained in:
Michael Telatynski
2022-05-09 13:39:32 +01:00
committed by GitHub
parent 7e21be06d0
commit 674aec4050
6 changed files with 163 additions and 29 deletions

View File

@ -18,6 +18,7 @@ import { Room, MatrixClient } from "matrix-js-sdk/src/matrix";
import AutocompleteWrapperModel from "../../src/editor/autocomplete";
import { PartCreator } from "../../src/editor/parts";
import DocumentPosition from "../../src/editor/position";
class MockAutoComplete {
public _updateCallback;
@ -78,11 +79,11 @@ export function createPartCreator(completions = []) {
}
export function createRenderer() {
const render = (c) => {
const render = (c: DocumentPosition) => {
render.caret = c;
render.count += 1;
};
render.count = 0;
render.caret = null;
render.caret = null as DocumentPosition;
return render;
}