Eigenaar wijzigen - geen focus meer op tekstvak

AI-generated summary

Users leopedrini and simon report that the “Change Owner” modal no longer automatically focuses the text input field, forcing users to click it manually — a regression from prior behavior. This lack of focus can lead to accidental triggering of Discourse keyboard shortcuts, as noted by leopedrini. The issue also affects the user invite form in private messages. codinghorror supports fixing it, provided mobile usability isn’t impacted. eviltrout resolved the issue by adding an autofocus attribute to the modal, with a pull request submitted at github.com/discourse/discourse/pull/11818.

Hello dears.

I’ve noticed that lately (not sure when it started), when we try to “Change Owner” of a topic, it don’t have the focus.

I mean, we need to move the mouse, and click the text box.

The behavior before was, after choosing “Change Owner”, we could simply start typing (focus was already in the text box).

Not sure if this is a real bug, but i would like to have old behavior back. :slight_smile:

1 like

I can reproduce this on my site. I’m also not sure if this would be classified as a bug or a UX issue. One thing that could make it a bug is that when focus isn’t given to an input, it’s easy to accidentally trigger a Discourse keyboard command.

I’m also seeing the lack of focus issue on the form used to invite users to a PM. I’m using the latest Chrome browser on Ubuntu.

2 likes

Yes. Exactly what happens to me all the time. :slight_smile:

1 like

As long as it doesn’t mess up mobile, I support fixing this @eviltrout

2 likes

I added a simple autofocus attribute which seems to work for this modal in a safe way:

https://github.com/discourse/discourse/pull/11818

6 likes