You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow link in terminal results in save dialog #30761
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeeded
Hmm, I can't reproduce, what is your default browser and what is the active program that shows up in the top-left of the screen when you have the save dialog focused?
Daniel Imms (@Tyriar)
Clicking links in the integrated terminal on Windows 7 works as expected. (Stable Code, latest Insiders)
Have to reproduce on OS X, seems surprising that would be platform dependent...
Daniel Imms (@Tyriar)
So I should still try and determine why the download link is opening, correct?
Also , shouldn't the pop-up be "Option+ Click" as opposed to "Alt + Click" when on OS X?
Good news , I can reproduce the problem ! In fact it does the same thing on Windows !
It will be much easier for me to debug this way
and I think I have some ideas about what's going on.
Stay tuned...
Daniel Imms (@Tyriar)
Your prior comment surmising that the default electron link handling might be an issue
was spot on. The default chromium behavior for clicking on links with Alt is to save the link contents
thus the save dialog - doesn't matter the platform.
Have a working fix:
I created a hypertext link handler and bypassed the default behavior in terminallinkhandler.
I should be able to cleanup and post a PR by tomorrow afternoon in case you want to include in Sunday's build.
Cheers
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeeded
Activity
[-]VS Code follow link in terminal results in save dialog[/-][+]Follow link in terminal results in save dialog[/+]Tyriar commentedon Jul 15, 2017
Hmm, I can't reproduce, what is your default browser and what is the active program that shows up in the top-left of the screen when you have the save dialog focused?
MartinNuc commentedon Jul 15, 2017
Daniel Imms (@Tyriar) my default browser is Safari. When I focus download dialog the active program remains
Code.I also tried to write link in the editor and ALT+click works well there.
Tried running Code using
code --verbose --disable-extensionsbut I dont see any output in console when clicking on the link in terminal :(Is there any way to debug what is actually happening?
Tyriar commentedon Jul 17, 2017
I'm guessing this is because I just defer to Electron to handle clicking an
<a>properly which for some reason isn't behaving in your case. The fix would probably be to explicitly handle opening of the URL at https://github.com/Microsoft/vscode/blob/b4d4d0128fe08798d7fd684d96c0819389eb6bf6/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts#L75 in the same way that the editor does it.cleidigh commentedon Jul 18, 2017
Daniel Imms (@Tyriar)
Seems like something different to work on. Shall I pick this up?
Tyriar commentedon Jul 18, 2017
Christopher Leidigh (@cleidigh) sounds good 👍
cleidigh commentedon Jul 19, 2017
Daniel Imms (@Tyriar)
Clicking links in the integrated terminal on Windows 7 works as expected. (Stable Code, latest Insiders)
Have to reproduce on OS X, seems surprising that would be platform dependent...
6 remaining items
Tyriar commentedon Jul 20, 2017
Martin Nuc (@MartinNuc) no this issue is fine
cleidigh commentedon Jul 20, 2017
Daniel Imms (@Tyriar)
So I should still try and determine why the download link is opening, correct?
Also , shouldn't the pop-up be "Option+ Click" as opposed to "Alt + Click" when on OS X?
Tyriar commentedon Jul 20, 2017
Yes, we need to figure out why the download link is opening.
Option and alt are the same key, typically both words are features on the key. We also use alt elsewhere.
cleidigh commentedon Jul 20, 2017
Martin Nuc (@MartinNuc)
I set "editor.multiCursorModifier": "ctrlCmd" on my OS X Sierra system:
Is it possible you have some key binding conflict? can you comment everything out and see what happens?
MartinNuc commentedon Jul 20, 2017
Tried to comment all my custom settings and keybindings, restart and the behaviour was same (download dialog opened).
I also tried
Code - Insidersand download dialog is also opening.I updated steps to reproduce in the first post.
cleidigh commentedon Jul 20, 2017
Martin Nuc (@MartinNuc)
Thanks for trying that out.
Good news , I can reproduce the problem ! In fact it does the same thing on Windows !
It will be much easier for me to debug this way
and I think I have some ideas about what's going on.
Stay tuned...
cleidigh commentedon Jul 22, 2017
Daniel Imms (@Tyriar)
Your prior comment surmising that the default electron link handling might be an issue
was spot on. The default chromium behavior for clicking on links with Alt is to save the link contents
thus the save dialog - doesn't matter the platform.
Have a working fix:
I created a hypertext link handler and bypassed the default behavior in terminallinkhandler.
I should be able to cleanup and post a PR by tomorrow afternoon in case you want to include in Sunday's build.
Cheers
cleidigh commentedon Jul 22, 2017
Martin Nuc (@MartinNuc)
Daniel Imms (@Tyriar)
Addressed with PR #31263
Merge pull request #31263 from cleidigh/terminal-clicklink/bug
Merge pull request microsoft#31263 from cleidigh/terminal-clicklink/bug