Skip to content

Conversation

@peterchinman
Copy link
Contributor

The reply input portaller had some logic that if a thread reply portal mount changed, we should refocus that reply input. This allows a thread reply input to stay focused as it gets moved around the DOM as other thread messages come in.

However, when we refetched channel data on browser tab focus, this effect was running. Now the effect checks if a thread reply input was the previously focused element before focusing it.

@peterchinman peterchinman requested a review from a team as a code owner December 3, 2025 19:28
}, 0);
}

if (ref() && props.onFocus) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think it matters here but this is not reactive on props.onFocus. passing the onfocus handler as static on componnet init is the expected thing but i have footgunned myself on this before

@peterchinman peterchinman merged commit 9448d90 into main Dec 3, 2025
18 checks passed
@peterchinman peterchinman deleted the peter/fix-channel-scrollig branch December 3, 2025 20:10
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.

4 participants