Skip to content

vscode focus on press widget (vscode) #8105

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
tgpsantos opened this issue Jul 26, 2024 · 6 comments
Open

vscode focus on press widget (vscode) #8105

tgpsantos opened this issue Jul 26, 2024 · 6 comments
Labels
ide: vs-code ide-integration P2 important to work on, but not at the top of the work list.

Comments

@tgpsantos
Copy link

I'm using devtools in VSCode and sometimes it's more convenient to just open it in a new window (instead of being docked in the same window). Unfortunately, with the automatic forced focus ON, the window focus is always switching back from the dev tools window to the code window.

This feature is super convenient btw, I just wish sometimes I could turn it off. Is that possible atm?

Thanks in advance


DevTools version: 2.34.3
IDE: VSCode
Connected Device:
CPU / OS: arm64 (64 bit) android
Connected app type: Flutter native (debug build)
Dart Version: 3.4.3
Flutter Version: 3.22.2 / stable
Framework / Engine: 761747bfc5 / edd8546116

@kenzieschmoll kenzieschmoll added ide: vs-code ide-integration P2 important to work on, but not at the top of the work list. labels Jul 31, 2024
@kenzieschmoll
Copy link
Member

@DanTup

@DanTup
Copy link
Contributor

DanTup commented Aug 1, 2024

@tgpsantos can you clarify what you mean by taking focus? I just tested with DevTools in an external browser and although it navigates around my code as I click on widgets, the VS Code window does not take focus - the browser remains in focus:

focus.mp4

Is this different to what you're seeing, or do you just mean you don't want the editor to navigate around the code? Thanks!

@DanTup
Copy link
Contributor

DanTup commented Aug 1, 2024

Also - if VS Code is taking focus, can you confirm what OS you're on? (I tested on Windows)

@tgpsantos
Copy link
Author

Hi Dan, thanks for following up.
I'm using dev tools plugin. See the attached video.

Also, after a couple of minimizes / maximizes the dev tools window becomes unresponsive. (this nomrally doesn't happen when in the same window as the working code)

Screen.Recording.2024-08-02.184231.mp4

@DanTup
Copy link
Contributor

DanTup commented Aug 5, 2024

@tgpsantos thanks for the video - I see now you're using a separate VS Code window rather than DevTools in the browser which is why I wouldn't repro.

It appears that this is VS Code behaviour - when we try to show a document, it looks like the window it's in will take focus. This was raised at microsoft/vscode#201053 in the context of tests, but it looks like the fix that was made was just to prevent this during the test runs rather than allowing it to be controlled generally.

I have opened microsoft/vscode#224836 about this because it feels like a bug (or at least an unreasonable limitation) in VS Code IMO. If it won't be fixed there, I think the best we can do is provide an option to disable the navigation (something tracked at #6561). Please add your 👍 to the issue!

I'll leave this issue open for a little while until there's a response on the VS Code issue, as it's possible even if it's addressed there we might need to make changes here (or more likely in the Dart-Code extension).

@DanTup
Copy link
Contributor

DanTup commented Aug 24, 2024

The VS Code issue microsoft/vscode#224836 was added to backlog candidates, which means it needs 20 👍 's in 60 days to avoid being closed by the bot. Please add your 👍s if you'd like to see this fixed!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
ide: vs-code ide-integration P2 important to work on, but not at the top of the work list.
Projects
None yet
Development

No branches or pull requests

3 participants