question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu is not closed when TAB is pressed

See original GitHub issue
  • downshift version: 1.22.1
  • node version: null
  • npm (or yarn) version: 5.5.1

Relevant code or config

What you did: Pressing TAB when isOpen is true

What happened: It stays open when no input present. Alternatively, It’s closed when there’s an input component.

Problem description: Actually, I can fix this problem by calling closeMenu on button onBlur. This is just a question though: what are the expected behavior? For me personally, it should be closed when user pressed TAB while isOpen={true}

Suggested solution: 👆if it’s the exected solution

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
MarkFalconbridgecommented, Jan 5, 2018

That would work.

1reaction
MarkFalconbridgecommented, Jan 5, 2018

You’d need to be careful just adding an onBlur. In the example https://codesandbox.io/s/zx1kj58npl, shift tabbing would certainly blur the button but you’d then have focused on the input so probably wouldn’t want to close the drop down.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent dropdown closing on pressing Tab in Materialize CSS ...
Clicking in the dropdown form works fine. Press Tab and it'll close the menu. $(document).ready(function(){ ...
Read more >
When i press Alt+Tab then esc, instead of closing the menu it
The Esc key does not close menus or tabs; To close tabs, press together the keys: Alt + F4; And to open the...
Read more >
Option to not close menu when opening new tab
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk. (2)...
Read more >
Browser window - Opera Help
If you've accidentally closed a tab or want to reactivate the most recently closed tab, right-click (Ctrl+click on Mac) a tab and select...
Read more >
Use tab groups with your keyboard - Google Chrome Help
To move to tab selection, press Ctrl + Tab. To switch focus to a specific tab, press Ctrl + Back or Ctrl +...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found