-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Profile: Navigate tabs by arrow keys when user profile opens. #28742
Conversation
fcad9fe
to
f77e545
Compare
@@ -463,6 +463,9 @@ export function show_user_profile(user, default_tab_key = "profile-tab") { | |||
const $elem = toggler.get(); | |||
$elem.addClass("large allow-overflow"); | |||
$("#tab-toggle").append($elem); | |||
setTimeout(() => { | |||
$(".ind-tab.first").trigger("focus"); | |||
}, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I believe with upcoming PRs, it'll be possible to have a different tab from the first one be initially selected (See #28445). Can you tweak this to focus the currently selected tab instead?
Left/right keys arrows in User Profile now navigates between tabs when it's first opened. Fixes zulip#28615
f77e545
to
14907ae
Compare
@timabbott updated the code so that if now focuses on the current selected tab instead. |
@amanagr is this ready for integration review? |
LGTM |
Merged, thanks @nimishmedatwal and @amanagr! |
Left/right keys arrows in User Profile now navigates between tabs when the modal is first opened.
This issue was pointed out by @amanagr here
Fixes: #28615
Screenshots and screen captures:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: