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

How to disable link click action #3426

Closed
2 tasks done
jstangroome opened this issue Jan 21, 2019 · 15 comments · Fixed by #4543
Closed
2 tasks done

How to disable link click action #3426

jstangroome opened this issue Jan 21, 2019 · 15 comments · Fixed by #4543
Labels
🐛 Type: Bug Issue pertains to something wrong within Hyper

Comments

@jstangroome
Copy link

  • I am on the latest Hyper.app version

  • I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Windows 10 Pro x64 1809

  • Hyper.app version: 2.1.1

Issue

When clicking in the terminal window to give focus, or to select text for copying, the click often lands on text that Hyper considers to be a URL and then Hyper opens the URL in my default browser which is unwanted in this scenario.

It appears that pre Hyper 2.x the URL click handler was a separate extension and supported the click being disabled or requiring a modified key to be held while clicking to trigger the navigation:
https://github.com/zeit/hyperlinks#change-click-action

Now that this URL click handling is built into Hyper 2.x, how can I disable the behaviour, or require a modifier key?

@ecker00
Copy link

ecker00 commented Feb 1, 2019

This issue is driving me bananas as well, I keep opening irrelevant links in my terminal, when I click to give it focus. "requiring a modified key to be held" would do wonders! (And feel natural for a terminal behaviour)

@ppot ppot added the 🐛 Type: Bug Issue pertains to something wrong within Hyper label Mar 3, 2019
@eromoe
Copy link

eromoe commented Mar 7, 2019

Today is my first try to hyper , this really annoy me ! I need a simple way to disable this . Any workaround for now ?

@gujunhk
Copy link

gujunhk commented Mar 8, 2019

Today is my first try to hyper , this really annoy me ! I need a simple way to disable this . Any workaround for now ?

The issue is watched by @ppot .
However, it hasn't been planned.

@antlauzon
Copy link

in ui/window.js:

    // xterm makes link clickable
    window.webContents.on('new-window', (event, url) => {
      const protocol = typeof url === 'string' && parseUrl(url).protocol;
      if (protocol === 'http:' || protocol === 'https:') {
        event.preventDefault();
        //shell.openExternal(url); <-- comment the devil here
      }
    });

@SamJoan
Copy link

SamJoan commented May 29, 2019

I too would like this behaviour to be disabled or at least configurable. I don't know how to apply @anthonylauzon's patch without having to rebuild the terminal, which I can't do right now :( may try later if I have some time.

@abroglesc
Copy link

Configurable would be ideal. Coming from iTerm2 they had it to where if I held command, then clicked a link it would open in a browser. Allowing to disable this functionality or add in a modifier like holding command + click link would be amazing!

@joshwcomeau
Copy link

++ this is the single biggest issue I'm having with Hyper, the server I use fills the window pointless URLs and I can't focus the window without very careful clicking.

Is this something the maintainers are open to? I could maybe open a PR to add a config option, if there's a willingness to merge it.

@zcaceres
Copy link

I also find this extremely frustrating. Ideally it should be configurable or at least only happen with a key press + click action.

@sydneyitguy
Copy link

👍

@regs79
Copy link

regs79 commented Aug 5, 2019

I think at least a config option for this would be good.

My dev browser isn't the same as my default and they're on different desktops. If I accidentally
click the link - which can happen just trying to focus on the terminal - I get sent 3 desktops over.

@edk
Copy link

edk commented Sep 5, 2019

@anthonylauzon - thank you so much! you saved my sanity. i was able to rebuild with your tip. Luckily it was pretty quick and painless to rebuild.

@ppamorim
Copy link

Please give us a option to disable this.

@woutervanwijk
Copy link

+1

1 similar comment
@Groovylein
Copy link

+1

@ernie18a
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Issue pertains to something wrong within Hyper
Projects
None yet
Development

Successfully merging a pull request may close this issue.