Skip to content
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

fix: right sidebar focus #11609

Merged
merged 1 commit into from
Sep 20, 2024
Merged

fix: right sidebar focus #11609

merged 1 commit into from
Sep 20, 2024

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Sep 19, 2024

Description

Fixes 2 main issues with the right sidebar focus:

  • Prevents the sidebar from stealing the focus when loading the page with the sidebar being initially opened.
  • Sets the focus on the sidebar when necessary (e.g. when opening/closing a specific sidebar panel).

I decided to get rid of the visibility- and the hidden-observer because it's painful to tweak them right and they weren't working as supposed anyway. The simple solution I went for sets the focus when opening the sidebar or a specific panel, or when closing a sub-panel and returning to the root panel.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Sep 19, 2024
Fixes 2 main issues with the right sidebar focus:

* Prevents the sidebar from stealing the focus when loading the page with the sidebar being initially opened.
* Sets the focus on the sidebar when necessary (e.g. when opening/closing a specific sidebar panel).
Copy link

sonarcloud bot commented Sep 20, 2024

@JammingBen JammingBen marked this pull request as ready for review September 20, 2024 05:41
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Cool stuff 🤩

@kulmann kulmann merged commit 58e8a1c into master Sep 20, 2024
3 checks passed
@kulmann kulmann deleted the fix/sidebar-focus branch September 20, 2024 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right sidebar has initial focus when open upon page visit
2 participants