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

Conversation

@SimonBrandner
Copy link
Contributor

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@t3chguy
Copy link
Member

t3chguy commented Jul 8, 2021

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

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@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 <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@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!

// 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

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

2 participants