Skip to content

Commit

Permalink
Fix: When I visit a link to a status, the user's avatar is focused
Browse files Browse the repository at this point in the history
Signed-off-by: marcin mikołajczak <[email protected]>
  • Loading branch information
mkljczk committed Jul 21, 2022
1 parent 2941c12 commit a3afeb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/soapbox/features/status/components/detailed-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class DetailedStatus extends ImmutablePureComponent<IDetailedStatus, IDetailedSt

return (
<div style={outerStyle}>
<div ref={this.setRef} className={classNames('detailed-status', { compact })}>
<div ref={this.setRef} className={classNames('detailed-status', { compact })} tabIndex={-1}>
<div className='mb-4'>
<AccountContainer
key={account.id}
Expand Down
2 changes: 1 addition & 1 deletion app/soapbox/features/status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ class Status extends ImmutablePureComponent<IStatus, IStatusState> {
offset: -80,
});

setImmediate(() => this.status?.querySelector('a')?.focus());
setImmediate(() => this.status?.querySelector<HTMLDivElement>('.detailed-status')?.focus());
}
}

Expand Down

0 comments on commit a3afeb6

Please sign in to comment.