Skip to content

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

Closed

Description

@msugakov

I'd like to follow-up on the existing issue that was closed for commenting and I can no longer make comments there. #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.

Activity

  1. fregante commented on Aug 6, 2020

    @fregante
    Member

    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.

  2. msugakov commented on Aug 6, 2020

    @msugakov
    Author

    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?

  3. fregante commented on Aug 6, 2020

    @fregante
    Member

    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?

  4. fregante commented on Aug 6, 2020

    @fregante
    Member

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

  5. msugakov commented on Aug 6, 2020

    @msugakov
    Author

    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

  6. fregante commented on Aug 6, 2020

    @fregante
    Member

    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?

  7. msugakov commented on Aug 7, 2020

    @msugakov
    Author

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

  8. fregante commented on Aug 7, 2020

    @fregante
    Member

    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:

    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.

  9. msugakov commented on Aug 7, 2020

    @msugakov
    Author

    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!

  10. fregante commented on Aug 7, 2020

    @fregante
    Member

    Excellent! Thanks for reporting a solution

  11. changed the title [-]Ability to expand all collapsed code in PR diffs - 2[/-] [+]`expand-all-collapsed-code` and `toggle-everything-with-alt` don't work on Linux[/+] on Aug 7, 2020
  12. locked as resolved and limited conversation to collaborators on Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions