about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers/compose.js
diff options
context:
space:
mode:
authorAkira Ouchi <akkiesoft@marokun.net>2023-01-30 22:49:10 +0900
committerClaire <claire.github-309c@sitedethib.com>2023-02-03 20:58:15 +0100
commit8ce02aa6e82d40d7a9e7c842ae2b67dcf31e8a79 (patch)
tree9c76f6bd92620e75861a3b53ad0b978a8ebe02df /app/javascript/flavours/glitch/reducers/compose.js
parent372fa3fe368714047e06bea5465f9e8f6926ac59 (diff)
[Glitch] autofocus the compose form again on /share
Port e73b55184b37e7f29e5bcb16c980dc8dbdb9a7d1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/compose.js')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index da38b201f..bb42580d4 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -303,8 +303,8 @@ const insertEmoji = (state, position, emojiData) => {
 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;