diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index c78ea293..1cc8c0b2 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -24,13 +24,11 @@ const { formatHumanReadableNumber, formatNumber, forSR } = useHumanReadableNumbe const reply = () => { if (!checkLogin()) return - if (details) { + if (details) focusEditor() - } - else { - const { key, draft } = getReplyDraft(status) - openPublishDialog(key, draft()) - } + + else + navigateTo({ path: getStatusRoute(status).href, state: { focusReply: true } }) } diff --git a/pages/[[server]]/@[account]/[status].vue b/pages/[[server]]/@[account]/[status].vue index 7c11f52a..3fdbc9ce 100644 --- a/pages/[[server]]/@[account]/[status].vue +++ b/pages/[[server]]/@[account]/[status].vue @@ -49,6 +49,11 @@ const focusEditor = () => { provide('focus-editor', focusEditor) +watch(publishWidget, () => { + if (window.history.state.focusReply) + focusEditor() +}) + onReactivated(() => { // Silently update data when reentering the page // The user will see the previous content first, and any changes will be updated to the UI when the request is completed