Fix reversed selections
This commit is contained in:
parent
491a601ad2
commit
02ec098283
1 changed files with 4 additions and 1 deletions
|
|
@ -104,7 +104,10 @@ export class CursorTracker {
|
||||||
relative_path: relativePath,
|
relative_path: relativePath,
|
||||||
document_id: record.documentId,
|
document_id: record.documentId,
|
||||||
vault_update_id: record.metadata.parentVersionId,
|
vault_update_id: record.metadata.parentVersionId,
|
||||||
cursors
|
cursors: cursors.map(({ start, end }) => ({
|
||||||
|
start: Math.min(start, end),
|
||||||
|
end: Math.max(start, end)
|
||||||
|
})) // the client might send directional selections
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue