Skip to content

fix(email): Recipient selector losing focus on mount#642

Merged
dev-rb merged 4 commits intomainfrom
rahul/fix-email-compose-focus-issue
Dec 15, 2025
Merged

fix(email): Recipient selector losing focus on mount#642
dev-rb merged 4 commits intomainfrom
rahul/fix-email-compose-focus-issue

Conversation

@dev-rb
Copy link
Copy Markdown
Contributor

@dev-rb dev-rb commented Dec 15, 2025

Summary

When going from the unified list view to composing an email, the recipient selector would briefly receive focus and then immediately lose it. This was caused by a Suspense issue which was triggered by the useEmailLinks hook that was reading query data inside of a memo to provide a value for status (now renamed to isConnected) AND by the logic in createControlledOpenSignal that tries to focus the previously in focus element when setting the value to false. The problem with the latter is that it will try to focus an element that is no longer there when we transition to a different view like the email compose view and thus trigger cause the element on the new view which should have focus, to lose it.

Reading a resource inside of a memo will immediately cause the nearest Suspense above the memo to be triggered because memos are not lazy in Solid 1.0.

This also fixes issues with other inputs in blocks not receiving focus when going through the create menu

Screenshots, GIFs, and Videos

@dev-rb dev-rb requested a review from a team as a code owner December 15, 2025 20:27
@dev-rb dev-rb requested a review from sedson December 15, 2025 21:01
@dev-rb dev-rb merged commit cbfad30 into main Dec 15, 2025
19 checks passed
@dev-rb dev-rb deleted the rahul/fix-email-compose-focus-issue branch December 15, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants