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

Support preserveFocus flag when opening editors or an output channel #1045

Closed
draivin opened this issue Dec 6, 2015 · 1 comment
Closed
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@draivin
Copy link

draivin commented Dec 6, 2015

When showing an OutputChannel, it will steal the current focus. In an atempt to be less disruptive and keep the user's current focus, I tried the following code:

let textDocument = vscode.window.activeTextEditor.document;
let channel = vscode.window.createOutputChannel('test');
channel.show(2);
vscode.window.showTextDocument(textDocument);

This returns the focus to the previously focused document, but it has one quirk, when any quick panel is opened and then closed, the focus will go to the OutputChannel instead of going to the previously focused document.

@bpasero bpasero assigned jrieken and unassigned bpasero Dec 8, 2015
@egamma egamma modified the milestone: Backlog Dec 10, 2015
@jrieken jrieken added the api label Dec 22, 2015
@jrieken
Copy link
Member

jrieken commented Dec 22, 2015

We should add an option to control is open does focus or not. Internally we already have that notion.

@jrieken jrieken modified the milestones: Jan 2016, Backlog Dec 22, 2015
@jrieken jrieken changed the title Strange interaction between showTextDocument and quick panels Support preserveFocus flag when opening editors or an output channel Dec 23, 2015
@jrieken jrieken added the feature-request Request for new features or functionality label Dec 23, 2015
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants