sindresorhus/refined-github

`expand-all-collapsed-code` and `toggle-everything-with-alt` don't work on Linux #3436

msugakov posted onGitHub

I'd like to follow-up on the existing issue that was closed for commenting and I can no longer make comments there. https://github.com/sindresorhus/refined-github/issues/2151

Peek 2020-08-06 11-20

I'm Linux user (xubuntu 20.04) with Firefox 79.0. I cannot use the feature to expand the entire diff' context using Alt+click. There's either browser's menu shown on Alt button press or just no reaction when clicking the diff expander while Alt is pressed.

Is there a way to make use of the feature for me?
I find this is really crucial to be able to see the entire file and it's surprising GitHub doesn't provide that natively.


Thanks for the GIF, that explains it. This is very likely due to the menu bar: when you press alt, the “mouseup” event (and therefore the “click” event) is no longer triggered on the button itself.

That is preventing you from using “alt-click” anywhere on the web. I don’t think that there’s a solution to this very niche issue that should probably be avoided by your browser, not us.

posted by fregante over 4 years ago

Thanks for taking a look! I think, there were Windows and Linux users who reported the similar issue in the previous thread, link. Basically, not everyone works or wants to work on Mac. Is there a possibility to remap modifier key to Shift or introduce a hotkey like Alt+E?

posted by msugakov over 4 years ago

Other maintainers have Windows and it works there.

Try this: zoom the page at 300%, try alt clicking. This should make sure that the mouseup/click event ends up on the button even after the content shift. Does it work? If not, can you post a gif again?

posted by fregante over 4 years ago

Alternatively, I think that the right alt key doesn’t show the menu. Can you also try alt-clicking with that?

posted by fregante over 4 years ago

Did both left and right Alts with 300%, same results. Right Alt does show the menu though. If I reconfigure right Alt to be a compose key, browser's menu isn't shown but that does not help still.

Left Alt + 300% Peek 2020-08-06 16-36 - left 300

Right Alt + 300% Peek 2020-08-06 16-36 - right 300

posted by msugakov over 4 years ago

According to this page, Linux users should be able to alt-click links to download the linked page (under mouse shortcuts) https://support.google.com/chrome/answer/157179?hl=en-GB

This should work on every system. Does it work for you?

posted by fregante over 4 years ago

Just tried in Chromium 84.0.4147.105, it does not work still. Would it be really so difficult to enable another modifier key?

posted by msugakov over 4 years ago

Would it be really so difficult to enable another modifier key?

Adding an alternative modifier means that we have to support it, document it, and it would also exclude the modifier from future use.

We have 5 separate features that use the alt key and GitHub themselves have alt-clicks too:

<img width="300" alt="" src="https://user-images.githubusercontent.com/1402241/89634078-b4521f00-d89c-11ea-8d52-703cf6439bbf.png">

Just tried in Chromium 84.0.4147.105, it does not work still.

It sounds like a whole host of software shortcuts isn't going to work for you then and I generally think it's better to solve the problem at the root, rather than force this onto a 3rd party.

posted by fregante over 4 years ago

MDN's info on MouseEvent.altKey:

Be aware that the browser can't always detect the alt key on some operating systems. On some Linux variants, for example, a left mouse click combined with the alt key is used to move or resize windows.

That's the case for xfce. This is very convenient. Rebinding Alt to Super (Windows) for windows moving/resizing as suggested here https://unix.stackexchange.com/a/86831 helps.

The feature works now for me.

Peek 2020-08-07 12-18

Thanks!

posted by msugakov over 4 years ago

Excellent! Thanks for reporting a solution

posted by fregante over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests