Back button on mouse breaks ui

Version ⁨24.11 (87ccd24e)⁩

  • click into a deck
  • use backspace to return to main menu
  • deck list no longer responses to click
  • Click on navigation “deck” menu would reset it

imgur dot com/a/ruIM5kO

I’d like to reproduce this but the only button that brings me back to the decks list is the d button (using debian linux, oldstable).

I did press the backspace button on my german keyboard and even checked in the terminal using xev what key is returned. I got this:

keycode 22 (keysym 0xff08, BackSpace)

Meaning I certainly did press the backspace key.

  1. May I ask what OS you’re using?
  2. Does this problem still persist in safe mode?

sorry correction.

It’s the back button on the mouse. not backspace.

same result in safe mode. Windows 10.

I have amended the title

1 Like

I think I know what you’re describing – but I agree that a standard Backspace key-press wouldn’t trigger it, unless you have that mapped to some other action.

Anki is essentially a set of webpages, so if you have something mapped to “Back” – like it would be used in your web browser (for me it’s a side button on my mouse) – clicking that could cause Anki to go “back” a page. But what you’re seeing is just a cached version, so it doesn’t work.

1 Like

On my Windows 11 machine, the back button on the mouse doesn’t go back to the previous screen. Are other users experiencing the same thing as the OP?

I can confirm it’s reproducible on Windows 11 with 24.06.2 (but IIRC it’s been this way in prior versions too). My “back” button on my mouse is mapped to a side-bump of the mouse-wheel, and I’m clumsy – so I accidentally reproduce this regularly. :sweat_smile:

For me on debian linux (oldstable) with anki 24.11 (87ccd24e)⁩ it doesn’t happen either. I can use my side mouse buttons to navigate back on my browser on linux (librewolf) but it doesn’t do anything on anki.

I wonder why it works for some users here and for some not. Is this a shortcut that can be enabled / disabled somewhere maybe?

We may be able to work around it with an event filter, but this would best be done by a dev who is able to reproduce it on their local machine.

I started looking at this but cannot reproduce the bug on my computer either, so it would be hard to know if anything I was doing worked.

My mouse Back/Forward buttons work in web browsers but do nothing in Anki.

OS: Windows 11 23H2

Anki:

  • release ⁨24.11 (87ccd24e)⁩
  • from source - git main (493320f)
  • from source - git 24.06.2 (33a9237)

Mouse: Logitech G502

My research in case it helps someone else:

Possibly override QWebEnginePage::triggerAction(...)
and filter out the WebActions QWebEnginePage::Back and QWebEnginePage::Forward (I don’t know if this works from Python, or could cause other problems).

Another old solution I found was to just clear the history after each navigation so there is nowhere to navigate back:

https://lists.qt-project.org/pipermail/qt-interest-old/2011-February/031283.html

1 Like