Merge branch 'status-focus' into 'develop'

Focus on selected status in status list, add moveUp/moveDown hotkeys to tombstone

See merge request soapbox-pub/soapbox-fe!1494
This commit is contained in:
marcin mikołajczak
2022-06-04 15:50:44 +00:00
3 changed files with 38 additions and 16 deletions

View File

@ -561,7 +561,12 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
renderTombstone(id: string) {
return (
<div className='py-4 pb-8'>
<Tombstone key={id} />
<Tombstone
key={id}
id={id}
onMoveUp={this.handleMoveUp}
onMoveDown={this.handleMoveDown}
/>
</div>
);
}
@ -635,6 +640,8 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
index: this.props.ancestorsIds.size,
offset: -80,
});
setImmediate(() => this.status?.querySelector('a')?.focus());
}
}