diff options
author | Akira Ouchi <akkiesoft@marokun.net> | 2023-01-30 22:49:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 14:49:10 +0100 |
commit | e73b55184b37e7f29e5bcb16c980dc8dbdb9a7d1 (patch) | |
tree | 571746096f9a5088725c88c996f7d8e27e166588 /app | |
parent | 96d26a941782f071e436f34c75e91c36462579d6 (diff) |
autofocus the compose form again on /share (#23094)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/standalone/compose/index.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/standalone/compose/index.js b/app/javascript/mastodon/features/standalone/compose/index.js index 0d764575f..fbadef6f4 100644 --- a/app/javascript/mastodon/features/standalone/compose/index.js +++ b/app/javascript/mastodon/features/standalone/compose/index.js @@ -9,7 +9,7 @@ export default class Compose extends React.PureComponent { render () { return ( <div> - <ComposeFormContainer /> + <ComposeFormContainer autoFocus /> <NotificationsContainer /> <ModalContainer /> <LoadingBarContainer className='loading-bar' /> diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 1760c7c89..77faa96a4 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -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; |