mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-19 07:57:00 +00:00
autofocus the compose form again on /share (#23094)
This commit is contained in:
parent
96d26a9417
commit
e73b55184b
|
@ -9,7 +9,7 @@ export default class Compose extends React.PureComponent {
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<ComposeFormContainer />
|
<ComposeFormContainer autoFocus />
|
||||||
<NotificationsContainer />
|
<NotificationsContainer />
|
||||||
<ModalContainer />
|
<ModalContainer />
|
||||||
<LoadingBarContainer className='loading-bar' />
|
<LoadingBarContainer className='loading-bar' />
|
||||||
|
|
|
@ -222,8 +222,8 @@ const privacyPreference = (a, b) => {
|
||||||
const hydrate = (state, hydratedState) => {
|
const hydrate = (state, hydratedState) => {
|
||||||
state = clearAll(state.merge(hydratedState));
|
state = clearAll(state.merge(hydratedState));
|
||||||
|
|
||||||
if (hydratedState.has('text')) {
|
if (hydratedState.get('text')) {
|
||||||
state = state.set('text', hydratedState.get('text'));
|
state = state.set('text', hydratedState.get('text')).set('focusDate', new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
|
|
Loading…
Reference in a new issue