Skip to content

feat: keyboard navigation initial implementation #8

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

Merged
merged 2 commits into from
Feb 11, 2023

Conversation

hb1998
Copy link
Owner

@hb1998 hb1998 commented Feb 8, 2023

No description provided.

@hb1998
Copy link
Owner Author

hb1998 commented Feb 8, 2023

stuck here

when the user clicks on a node, it navigates to that file, which moves the focus to the editor, so keyboard listener is not working unless the extension window is focussed back again.

tried this workaround
https://github.com/hb1998/react-component-tree/pull/8/files#diff-b7609b59c5c1da74fd143b1e3ffec0e40bc254cf8a7879718a4425d9ee324598R53
doesn't seem to work

@hb1998
Copy link
Owner Author

hb1998 commented Feb 11, 2023

I was dumb enough to not notice this

const editor = await vscode.window.showTextDocument(doc, { preserveFocus: true, preview: false });

making preserveFocus: true did the trick

@hb1998 hb1998 marked this pull request as ready for review February 11, 2023 03:41
@hb1998 hb1998 merged commit 9891367 into master Feb 11, 2023
@hb1998
Copy link
Owner Author

hb1998 commented Feb 11, 2023

fixes #4

@hb1998 hb1998 deleted the keyboard-navigation branch February 11, 2023 04:15
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.

1 participant