Fix focus behaviour when opening single-purpose pages, and rooms#2349
Merged
ajbura merged 9 commits intocinnyapp:devfrom Jun 28, 2025
Merged
Fix focus behaviour when opening single-purpose pages, and rooms#2349ajbura merged 9 commits intocinnyapp:devfrom
ajbura merged 9 commits intocinnyapp:devfrom
Conversation
|
Preview: https://2349--pr-cinny.netlify.app |
ajbura
requested changes
Jun 27, 2025
ajbura
approved these changes
Jun 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR improves focus behaviour as formulated in #2348 when opening pages/popups that have a singular purpose.
It also focuses the message field when opening a room, to more clearly indicate to the user that they can begin typing immediately.
The reasoning for suggesting these changes is primarily that pages where you can only do one thing, should let you do those things in one click (ie. search, creating new DM). Focusing on the message field enables simply entering a room and immediately starting to type (while the user can currently do this, that is not communicated to the user). Not gaining focus on mobile prevents the onscreen keyboard from appearing when it's not wanted (ie. when just reading messages).
This also unifies the UX as
CTRL+Ksearch already gains focus automatically.This PR makes the following changes:
The following always gain focus:
The following gain focus when not on mobile:
Example videos:
Current:
Desktop-Current-LQ.mp4
Mobile-Current.mp4
After changes:
Desktop-After-LQ.mp4
Mobile-After.mp4
Fixes #2348, Fixes #2261
Type of change
Checklist: