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

[#53767] fix: focus input field after selecting a filter #16999

Conversation

EinLama
Copy link
Contributor

@EinLama EinLama commented Oct 21, 2024

Ticket

https://community.openproject.org/wp/53767

What are you trying to accomplish?

Screenshots

focus_filter_after_selection.mov

What approach did you choose and why?

The fix consists of two parts.

  1. the filter form controller adds a focus()-call on the appropriate element after adding a new filter
  2. in order for focus to work, browsers require form elements to have unique IDs. We were breaking with this rule as all filters had the same generic id of value. Changed the DOM ids to be prefixed with the filter name to make them unique.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@EinLama EinLama force-pushed the bug/53767-user-is-not-taken-to-the-secondary-input-field-after-selecting-a-filter branch 2 times, most recently from c35f878 to abd6861 Compare October 21, 2024 09:47
@EinLama EinLama force-pushed the bug/53767-user-is-not-taken-to-the-secondary-input-field-after-selecting-a-filter branch from b17c566 to 9bca254 Compare October 21, 2024 12:20
@EinLama EinLama added the bugfix label Oct 21, 2024
@EinLama EinLama marked this pull request as ready for review October 21, 2024 12:31
@oliverguenther oliverguenther merged commit 47ed900 into dev Oct 21, 2024
17 checks passed
@oliverguenther oliverguenther deleted the bug/53767-user-is-not-taken-to-the-secondary-input-field-after-selecting-a-filter branch October 21, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants