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

Cumbersome to use documentation when switching between browser and terminal repeatedly #47

Open
luspi opened this issue Oct 9, 2024 · 1 comment

Comments

@luspi
Copy link

luspi commented Oct 9, 2024

Describe the bug
I am working through some of the examples and want to read the explanation and then run the example in a terminal. However, switching windows with Alt+Tab always toggles the search. And when I toggle the search again to get the documentation back, then the page is scrolled back to the top, i.e., I have to scroll back down to where I was a few seconds ago. This is rather annoying and costs quite a lot of time, especially since I'm switching windows a lot to tweak the examples based on what I'm reading in the documentation.

Expected behavior
Using Alt+Tab to switch from browser to terminal does not mess with the documentation display. One idea might be to make this behavior optional?

Desktop (please complete the following information):

  • OS: Linux
  • Browser Firefox
  • Version 131

Thank you!

@luspi
Copy link
Author

luspi commented Oct 22, 2024

As a temporary workaround, this Greasemonkey script (inspired by this answer) can be used to disable the behavior of Alt here:

// @name           Disable Alt switch
// @description    Stop Alt from switching documentation
// @run-at         document-start
// @include        https://doc.freefem.org/*
// @grant          none
// ==/UserScript==

(window.opera ? document.body : document).addEventListener('keydown', function(e) {
    if (e.altKey) {
        e.cancelBubble = true;
        e.stopImmediatePropagation();
    }
    return false;
}, !window.opera);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant