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

[Bug]: Some hotkeys don't work on Firefox on Linux #3988

Closed
gdower opened this issue Jul 9, 2024 · 12 comments
Closed

[Bug]: Some hotkeys don't work on Firefox on Linux #3988

gdower opened this issue Jul 9, 2024 · 12 comments
Assignees
Labels
bug An existing function is broken.

Comments

@gdower
Copy link
Contributor

gdower commented Jul 9, 2024

Steps to reproduce the bug

  1. On Arch Linux with X11 KDE 6.1.2-1 desktop environment using Firefox 127.0.2 in the edit nomenclature task, a lot of the hotkey shortcuts do not work including: alt+d, alt+f, alt+l, alt+n, alt+p, alt+s, alt+b, alt+c
  2. Some of these hotkeys are bound to Firefox functions: alt+d highlights the URL in the location bar. alt+f opens the Firefox file menu. alt+s opens the browser history menu. alt+b opens the Firefox bookmark menu. alt-c, alt-l, alt-n, alt-p don't seem to trigger anything in Firefox.
  3. Other the other shortcuts like alt+h do work.
  4. While writing this bug report, I was momentarily able to trigger both the Firefox and TaxonWorks function calls with some of the above nonfunctioning TW hotkeys but now can't reproduce it. For example, alt+e momentarily both opened the Firefox edit menu and navigated to comprehensive specimen digitization.
  5. This might be a Linux Firefox bug and not a TaxonWorks bug.

Possibly there is a related issue with shortcuts being bound to other functions?

Screenshot

image

Expected behavior

Ideally if it is possible to override the Firefox hotkeys and bind them to the TaxonWorks functions that might be ideal. At least I don't usually use those alt Firefox keyboard shortcuts. I do use ctrl Firefox shortcuts like ctrl+f, ctrl+l and ctrl+j a lot.

Additional Screenshots

No response

Environment

Sandbox

Sandbox Used

sandbox

Version

bd8bdeb

Browser Used

Arch Linux with KDE 6.1.2-1 using Firefox 127.0.2

@gdower gdower added the bug An existing function is broken. label Jul 9, 2024
@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

I also noticed in Firefox that sometimes after triggering an alt shortcut (like alt+o), when hitting the browser back button after triggering the alt+o shortcut, if you click alt again by itself with no other keys pressed it would re-trigger the last called alt+o shortcut. I'm also testing it on Chromium 126.0.6478.126 (Official Build) Arch Linux (64-bit) and it does the same behavior, so maybe it is a TaxonWorks bug.

On Chromium all the shortcuts work except alt+d (highlights URL in location bar), alt+f (opens browser hamburger menu), and these hotkeys all seem to trigger nothing in the browser or TW: alt+l, alt+s, alt+m, alt+c, alt+shift+l. Some of the other shortcuts that do work, sometimes don't work and I'm not sure yet what causes the inconsistent behavior.

Sometimes a bunch of the alt shortcuts stop working until I reload the edit nomenclature page, so it seems to be a conflict between the browser binding shortcuts and TW binding shortcuts.

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

I found that you can do page-specific Firefox permissions including allowing overriding keyboard shortcuts but most of the shortcuts still don't work and still trigger the Firefox alt menus:

image

I found an actual workaround that works.

In Firefox about:config set these keys:

ui.key.menuAccessKeyFocuses = false
ui.key.menuAccessKey = 0

That fixes all hotkeys except alt+l and alt+e and this likely TW bug still exists:

I also noticed in Firefox that sometimes after triggering an alt shortcut (like alt+o), when hitting the browser back button after triggering the alt+o shortcut, if you click alt again by itself with no other keys pressed it would re-trigger the last called alt+o shortcut. I'm also testing it on Chromium 126.0.6478.126 (Official Build) Arch Linux (64-bit) and it does the same behavior, so maybe it is a TaxonWorks bug.

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

alt+e works at the species group level. So it's just alt+l (clone taxon name) that doesn't work after disabling the Firefox alt shortcuts.

@jlpereira jlpereira self-assigned this Jul 9, 2024
@jlpereira
Copy link
Member

I'm going to prevent default behavior for these events

@jlpereira
Copy link
Member

@gdower pushed changes for New taxon name, let me know if it works.

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

@debpaul helped test this on Windows. The back button alt bug is reproducible on Windows. Almost all of the TW hotkeys work on Windows (except alt+l clone taxon name) but they also almost always also trigger opening the Firefox menus which may discourage use of the hotkeys by Windows users. Although perhaps the solution is to just document the above about:config workaround because the power users that are using hotkeys will probably be comfortable with modifying keys in about:config (unless they routinely use the Firefox alt key shortcuts to access the browser menus).

@jlpereira
Copy link
Member

Did she test it on local env after pull last commit? or sandbox/production?

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

It was on sandbox

@jlpereira
Copy link
Member

I was able to replicate it on Windows using FF Development edition , but after last commit it seems to work now.

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

So there's 2 hotkey bugs.

  1. Do you want steps to reproduce the back button alt bug or does what I put above make sense?
  2. After disabling the Firefox alt shortcuts, the only other bug is alt+l not cloning a taxon name.

I'll test the development branch locally.

@jlpereira
Copy link
Member

I will check alt+l

@gdower
Copy link
Contributor Author

gdower commented Jul 9, 2024

Awesome, you fixed the alt browser back button bug! alt+l doesn't work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing function is broken.
Projects
None yet
Development

No branches or pull requests

2 participants