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: support Enter to go from a folded listbox to a row #1219

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

quanho
Copy link
Collaborator

@quanho quanho commented Apr 13, 2023

Motivation

To fix qlik-oss/sn-list-objects#263.
The user should be able to go from a folded listbox to the first row by Enter like an unfolded listbox.

Requirements checklist

  • Api specification
    • Ran yarn spec
      • No changes OR API changes has been formally approved
  • Unit/Component test coverage
  • Correct PR title for the changes (fix, chore, feat)

When build and tests have passed:

  • Add code reviewers, for example @qlik-oss/nebula-core

@quanho quanho changed the title fix: support Enter -> Enter to go from a collapsed listbox to a row fix: support Enter to go from a folded listbox to a row Apr 13, 2023
@quanho quanho requested a review from johanlahti April 13, 2023 14:12
@@ -180,7 +180,7 @@ export function getListboxInlineKeyboardNavigation({
// 3. Blur row and focus the listbox container.
keyboard.blur();
const c = currentTarget.closest('.listbox-container');
c.setAttribute('tabIndex', 0);
c.setAttribute('tabIndex', -1);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is unnecessary, what happens if you remove it? Do we ever set it to 0 elsewhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do not set it 0 to elsewhere but to make it focusable we should set tabIndex to -1.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I do think it needed to focus on it when keyboardNavigation is false (I think it would have no tabIndex without it)
but I am also questioning if it should be focused in that case.

@quanho quanho merged commit 8eabc25 into master Apr 13, 2023
@quanho quanho deleted the hva/sn-filterpane-263 branch April 13, 2023 14:19
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.

"Enter" does not work as expected in collapsed filterpane
3 participants