[Glitch] Fix compose form behavior in mobile view
Port 034f37b85a
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@ -199,6 +199,14 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
this._updateFocusAndSelection({ });
|
||||
}
|
||||
|
||||
componentDidUpdate (prevProps) {
|
||||
this._updateFocusAndSelection(prevProps);
|
||||
}
|
||||
|
||||
// This statement does several things:
|
||||
// - If we're beginning a reply, and,
|
||||
// - Replying to zero or one users, places the cursor at the end
|
||||
@ -206,7 +214,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
// - Replying to more than one user, selects any usernames past
|
||||
// the first; this provides a convenient shortcut to drop
|
||||
// everyone else from the conversation.
|
||||
componentDidUpdate (prevProps) {
|
||||
_updateFocusAndSelection = (prevProps) => {
|
||||
const {
|
||||
textarea,
|
||||
spoilerText,
|
||||
|
Reference in New Issue
Block a user