1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

autofocus the compose form again on /share (#23094)

This commit is contained in:
Akira Ouchi 2023-01-30 22:49:10 +09:00 committed by GitHub
parent 96d26a9417
commit e73b55184b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ export default class Compose extends React.PureComponent {
render () {
return (
<div>
<ComposeFormContainer />
<ComposeFormContainer autoFocus />
<NotificationsContainer />
<ModalContainer />
<LoadingBarContainer className='loading-bar' />

View file

@ -222,8 +222,8 @@ const privacyPreference = (a, b) => {
const hydrate = (state, hydratedState) => {
state = clearAll(state.merge(hydratedState));
if (hydratedState.has('text')) {
state = state.set('text', hydratedState.get('text'));
if (hydratedState.get('text')) {
state = state.set('text', hydratedState.get('text')).set('focusDate', new Date());
}
return state;