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

Layer index is reset when a route change (Configure, Key Tester ect...) #243

Open
yadomi opened this issue Apr 13, 2024 · 1 comment
Open

Comments

@yadomi
Copy link

yadomi commented Apr 13, 2024

The layer index in the Configure tab is reset when navigating to another tab and going back to the Configure tab. This makes it cumbersome to quickly change a key and test it in the Key Tester.

The origin of the issue seems to come from this setLayer here:

dispatch(setLayer(0));

To reproduce the issue:

  1. Go to the Configure Tab
  2. Click on a layer in the Layer Control (e.g., pick layer 2)
  3. Go to any other tab (e.g.: pick Key Tester)
  4. Go back to the Configure tab
  5. ==> The layer is now reset to number 1

I'm not sure what the implication of the setLayer call in keyboard.tsx is and what it does in the first place (I've tried to blame/search in commit history for a lead, with no luck).

Let me know if a PR is welcomed to remove it.

@yadomi
Copy link
Author

yadomi commented Apr 13, 2024

#238 might be relevant to this issue

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

No branches or pull requests

1 participant