Skip to content

Commit 4155622

Browse files
committed
fix: click on compose should reset if editing or quoting
1 parent 22698ba commit 4155622

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/soapbox/actions/compose.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ const replyCompose = (status: Status) =>
153153

154154
const compose = (history: History, intl: IntlShape) =>
155155
(dispatch: AppDispatch, getState: () => RootState) => {
156+
// if we were editing a status before, we clear because editing is not a long lasting action
157+
// we clear existing quote as this is not a long lasting action
158+
const state = getState();
159+
if (state.compose.id || state.compose.quote) {
160+
dispatch(resetCompose());
161+
}
162+
156163
history.push('/statuses/compose');
157164
};
158165

0 commit comments

Comments
 (0)