Skip to content

agent_ui: Fix message editor stealing focus from other panels#47321

Merged
Veykril merged 2 commits intozed-industries:mainfrom
fabianszabo:fix-stealing-focus-bug
Jan 22, 2026
Merged

agent_ui: Fix message editor stealing focus from other panels#47321
Veykril merged 2 commits intozed-industries:mainfrom
fabianszabo:fix-stealing-focus-bug

Conversation

@fabianszabo
Copy link
Contributor

@fabianszabo fabianszabo commented Jan 21, 2026

Closes #41278, Closes #45576, Closes #46513

Release Notes:

  • Fixed message editor stealing focus (so the "Open Recent Project" modal stays open)

This issue has been driving me insane haha.

Note: This is my first code contribution to this project. Please be kind and let me know if I have missed something. I tested this fix on my machine and it works. Tests are passing on my device. I have agreed to the Zed Contributor License and Feedback Agreement with my Zed Account that's linked to the same email as this GitHub account.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 21, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 21, 2026
@marcocondrache
Copy link
Contributor

marcocondrache commented Jan 21, 2026

I think this was already tried by @Veykril in #46231 and later reverted.

Since this fix is almost the same, it’ll probably run into the same issues as the initial PR.

@fabianszabo
Copy link
Contributor Author

@marcocondrache Thank you for pointing that out. I'll check that out.

@fabianszabo
Copy link
Contributor Author

@marcocondrache Thank you again for your note. It is now resolved also.

@Veykril
Copy link
Member

Veykril commented Jan 22, 2026

Did you test that opening a new agent thread will autofocus the editor with this change still? That was t he reason we reverted that other PR and I don't think this doesn't suffer from the same issue?

@fabianszabo
Copy link
Contributor Author

@Veykril Yes, I specifically tested that. I had the same issue before my second commit, but it's working fine now.

@Veykril
Copy link
Member

Veykril commented Jan 22, 2026

Okay thanks for confirming

@Veykril
Copy link
Member

Veykril commented Jan 22, 2026

(so the "Open Recent Project" modal stays open)

And yea, that was my main pain point as well :)

Thanks for looking into this!

@Veykril Veykril enabled auto-merge (squash) January 22, 2026 09:05
@Veykril Veykril merged commit 67e0cec into zed-industries:main Jan 22, 2026
30 checks passed
@fabianszabo fabianszabo deleted the fix-stealing-focus-bug branch January 22, 2026 09:44
zcg pushed a commit to zcg/zedpro that referenced this pull request Jan 29, 2026
…dustries#47321)

Closes zed-industries#41278,
zed-industries#45576,
zed-industries#46513

Release Notes:

- Fixed message editor stealing focus (so the "Open Recent Project"
modal stays open)

This issue has been driving me insane haha.


_Note: This is my first code contribution to this project. Please be
kind and let me know if I have missed something. I tested this fix on my
machine and it works. Tests are passing on my device. I have agreed to
the Zed Contributor License and Feedback Agreement with my Zed Account
that's linked to the same email as this GitHub account._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

3 participants