about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/compose.js
diff options
context:
space:
mode:
authorAkira Ouchi <akkiesoft@marokun.net>2023-01-30 22:49:10 +0900
committerGitHub <noreply@github.com>2023-01-30 14:49:10 +0100
commite73b55184b37e7f29e5bcb16c980dc8dbdb9a7d1 (patch)
tree571746096f9a5088725c88c996f7d8e27e166588 /app/javascript/mastodon/reducers/compose.js
parent96d26a941782f071e436f34c75e91c36462579d6 (diff)
autofocus the compose form again on /share (#23094)
Diffstat (limited to 'app/javascript/mastodon/reducers/compose.js')
-rw-r--r--app/javascript/mastodon/reducers/compose.js4
1 files changed, 2 insertions, 2 deletions
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;