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

🐛 TabView - shortcutsEnabled is not working #93

Closed
henry2man opened this issue Nov 11, 2021 · 9 comments
Closed

🐛 TabView - shortcutsEnabled is not working #93

henry2man opened this issue Nov 11, 2021 · 9 comments
Labels
blocked Issue blocked by another issue or pull-request bug Something isn't working

Comments

@henry2man
Copy link
Contributor

Describe the bug
I'm not able to enable TabView shortcuts using shortcutsEnabled: true. I've tested both on Chrome and MacOS native.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a TabView with shortcutsEnabled: true
  2. Create some tabs
  3. Press 1-8 (first to eighth tab), nothing happens
  4. Press 9 (last tab), nothing happens
  5. Press Ctrl + W (using MacOS), nothing happens

Expected behavior
As documented, the shortcuts lets the user navigate through the tabs.

Screenshots
N/A

Additional context
N/A

@henry2man
Copy link
Contributor Author

Related to #15 ?

@bdlukaa bdlukaa added the bug Something isn't working label Nov 20, 2021
bdlukaa added a commit that referenced this issue Nov 20, 2021
WinXaito pushed a commit to WinXaito/fluent_ui that referenced this issue Nov 28, 2021
@WinXaito
Copy link
Collaborator

@bdlukaa the commit f3bc01a fix this issue ? Can be closed ?

@bdlukaa
Copy link
Owner

bdlukaa commented Dec 11, 2021

I couldn't make shortcuts working, that's why I didn't close it.

@WinXaito
Copy link
Collaborator

Waiting to have this in stable: flutter/flutter#93693

And after that, add a Focus(autofocus: true, child: tabBar) here: https://github.com/bdlukaa/fluent_ui/blob/master/lib/src/controls/navigation/tab_view.dart#L294

@bdlukaa bdlukaa added the blocked Issue blocked by another issue or pull-request label Dec 25, 2021
@labulakalia
Copy link

i add textfiled to bodies, when textfiled input get focus,shortcut is worker,when loss focus, shortcut not is worker

@henry2man
Copy link
Contributor Author

@WinXaito How can we know if this issue is included in latest 3.0.x version of Flutter?

Maybe we can fix this now here.

@WinXaito
Copy link
Collaborator

WinXaito commented Jun 2, 2022

@WinXaito How can we know if this issue is included in latest 3.0.x version of Flutter?

Maybe we can fix this now here.

Seems to be different in 3.1.0: https://github.com/flutter/flutter/blob/3.1.0/packages/flutter/lib/src/widgets/shortcuts.dart#L1033-L1042

And the PR: https://github.com/flutter/flutter/pull/93693/files#diff-8993c409f9f79bcf62387d9f603fa69c2178163e84a697819af5bec956a3384eL1007-R1012

so I think there was another pull request behind it. So maybe that fixes the problem?

(this PR was the last change: flutter/flutter#100167)

@bdlukaa bdlukaa closed this as completed Jun 29, 2022
@bdlukaa bdlukaa reopened this Jun 29, 2022
@bdlukaa
Copy link
Owner

bdlukaa commented Jun 29, 2022

Shortcuts are working on TabViews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issue blocked by another issue or pull-request bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants