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

Preserve focus of the http editor #167

Closed
lostfields opened this issue Feb 17, 2018 · 9 comments
Closed

Preserve focus of the http editor #167

lostfields opened this issue Feb 17, 2018 · 9 comments

Comments

@lostfields
Copy link

Pretty please preserve focus of the http/rest editor. Whenever I open a new file it opens at the right side, that is annoying.

https://code.visualstudio.com/docs/extensionAPI/vscode-api#showTextDocument

showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable

Set preserveFocus to true.

@Huachao
Copy link
Owner

Huachao commented Feb 19, 2018

@lostfields do you want to keep the request editor focus after the response view is shown. The reason for switching to the response view is that normally users want to inspect the response directly, scroll the response page up and down. Maybe I can provide a setting to control this, do you think it's OK for you?

@lostfields
Copy link
Author

yes, that would be nice - and then it's probably possible to override in workspace-settings as well?

@Huachao
Copy link
Owner

Huachao commented Feb 20, 2018

@lostfields yes, either user setting or workspace setting is ok

@Huachao
Copy link
Owner

Huachao commented Mar 15, 2018

@lostfields since response preview is in fact a webview page, and vscode doesn't allow the preserveFocus option currently.

@Huachao
Copy link
Owner

Huachao commented May 7, 2018

@lostfields VSCode will support this option in webview in May Release, so I will complete this as soon as it is released.

@Huachao
Copy link
Owner

Huachao commented Jun 7, 2018

@lostfields @jon301 @Arturock I have added a setting named previewResponsePanelTakeFocus, by default its value is true. So you can set it to false to preserve http editor focus.

@Huachao Huachao closed this as completed Jun 7, 2018
@artrz
Copy link

artrz commented Jun 8, 2018

Great news @Huachao! Thank you so much!

@Huachao
Copy link
Owner

Huachao commented Jun 28, 2018

@lostfields @jon301 @Arturock now you can use the new setting rest-client.previewResponsePanelTakeFocus to preserve focus of the http editor, by default it will be true, you can set it to false to achieve it.

@artrz
Copy link

artrz commented Jun 28, 2018

Working perfectly! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants