Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Focus composer after reacting #6332

Merged

Conversation

SimonBrandner
Copy link
Contributor

@t3chguy
Copy link
Member

t3chguy commented Jul 8, 2021

Hmm won't these focus the wrong composer if used whilst editing a message?

@SimonBrandner
Copy link
Contributor Author

Hmm won't these focus the wrong composer if used whilst editing a message?

This is the current behaviour but we should change it

Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
@SimonBrandner SimonBrandner requested a review from t3chguy July 8, 2021 16:45
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@@ -398,7 +398,7 @@ class LoggedInView extends React.Component<IProps, IState> {
// refocusing during a paste event will make the
// paste end up in the newly focused element,
// so dispatch synchronously before paste happens
dis.fire(Action.FocusComposer, true);
dis.fire(Action.FocusSendMessageComposer, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one I'm not sure about, but happy to go with it for the time being

@@ -552,7 +552,7 @@ class LoggedInView extends React.Component<IProps, IState> {

if (!isClickShortcut && ev.key !== Key.TAB && !canElementReceiveInput(ev.target)) {
// synchronous dispatch so we focus before key generates input
dis.fire(Action.FocusComposer, true);
dis.fire(Action.FocusSendMessageComposer, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one I'm not sure about, but happy to go with it for the time being

@t3chguy t3chguy merged commit ac309a0 into matrix-org:develop Jul 9, 2021
@SimonBrandner SimonBrandner deleted the fix/focus-composer-reaction/11023 branch July 9, 2021 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After sending a reaction, focus should be returned to the composer
2 participants