cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.86k stars 239 forks source link

After editing a message by pressing `UP`, browser should automatically refocus text input #1389

Closed LiamPerson closed 10 months ago

LiamPerson commented 1 year ago

Describe the problem

When I edit a message (using the UP arrow key), then finish editing (by pressing Enter), my browser does not focus any inputs, leaving me to accidentally call obscure hotkeys in my browser.

Describe the solution you'd like

After I edit a message using keyboard shortcuts (e.g: pressing UP, and then pressing enter) my browser should automatically refocus the main input (being "Send a message...").

image

Pressing UP

image

All is good so far... Now when I press Enter, you will notice nothing is focused anymore. Ideally, it should refocus to the input with the arrow pointing to it in the below image:

image

Alternatives considered

No response

Additional context

No response

N-R-K commented 10 months ago

Ideally, it should refocus to the input

This seems to be what discord does as well for reference.

(Also the UP arrow binding doesn't seem to be working at all on dev version anymore).

notramo commented 10 months ago

This is fixed by completely removing the message editing feature on latest nightly build.

ajbura commented 10 months ago

https://github.com/cinnyapp/cinny/pull/1447 handled it

N-R-K commented 10 months ago

On current dev, UP is working again. But it doesn't refocus on the input box after editing. Actually nevermind, it does. But no cursor seems to appear on the input box, which is what had me confused.