mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-14 10:11:11 +02:00
Re-focus the composer on dialogue quit (#10007)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4574c665ea
commit
cf7ab9a8c6
@ -339,9 +339,15 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
|
|||||||
} else {
|
} else {
|
||||||
shouldSend = false;
|
shouldSend = false;
|
||||||
}
|
}
|
||||||
} else if (!(await shouldSendAnyway(commandText))) {
|
} else {
|
||||||
|
const sendAnyway = await shouldSendAnyway(commandText);
|
||||||
|
// re-focus the composer after QuestionDialog is closed
|
||||||
|
dis.dispatch({
|
||||||
|
action: Action.FocusAComposer,
|
||||||
|
context: this.context.timelineRenderingType,
|
||||||
|
});
|
||||||
// if !sendAnyway bail to let the user edit the composer and try again
|
// if !sendAnyway bail to let the user edit the composer and try again
|
||||||
return;
|
if (!sendAnyway) return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (shouldSend) {
|
if (shouldSend) {
|
||||||
|
@ -385,9 +385,15 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||||||
} else {
|
} else {
|
||||||
shouldSend = false;
|
shouldSend = false;
|
||||||
}
|
}
|
||||||
} else if (!(await shouldSendAnyway(commandText))) {
|
} else {
|
||||||
|
const sendAnyway = await shouldSendAnyway(commandText);
|
||||||
|
// re-focus the composer after QuestionDialog is closed
|
||||||
|
dis.dispatch({
|
||||||
|
action: Action.FocusAComposer,
|
||||||
|
context: this.context.timelineRenderingType,
|
||||||
|
});
|
||||||
// if !sendAnyway bail to let the user edit the composer and try again
|
// if !sendAnyway bail to let the user edit the composer and try again
|
||||||
return;
|
if (!sendAnyway) return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user