Fix issues around up arrow event edit shortcut (#9645)
This commit is contained in:
parent
09282d9f36
commit
d341c56b1f
3 changed files with 20 additions and 6 deletions
|
@ -110,7 +110,8 @@ export function findEditableEvent({
|
|||
events: MatrixEvent[];
|
||||
isForward: boolean;
|
||||
fromEventId?: string;
|
||||
}): MatrixEvent {
|
||||
}): MatrixEvent | undefined {
|
||||
if (!events.length) return;
|
||||
const maxIdx = events.length - 1;
|
||||
const inc = isForward ? 1 : -1;
|
||||
const beginIdx = isForward ? 0 : maxIdx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue