-
Notifications
You must be signed in to change notification settings - Fork 14
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] In editor: Shortcuts won't work after clicking outside of the active/focused field #185
Comments
Hello, |
My initial hunch turned out to be right and I've managed to find a solution. However, I'm not 100% sure that my fix is without consequences. From my understanding of 8270ce1, there was a slight oversite in regards to the shortcut handling. I've gone into detail about it here: ankitects/anki#1861 (comment). for row in cuts:
if len(row) == 2:
keys, fn = row
#fn = self._addFocusCheck(fn)
else:
keys, fn, _ = row
scut = QShortcut(QKeySequence(keys), self.widget, activated=fn) You can just comment this out for now in your monkey patch and it should work fine. |
I've noticed this as well, very frustrating. |
Idk why he hasn't merged it. But you can just use my fork. It works without any issues. |
Hi,
the addon breaks when you click anywhere else than on a field while being in the editor :/
One has to click another field and back to the desired field of choice to reactivate the shortcuts.
Native shortcuts on the other hand, like CMD+B for Bold, continue to work.
I have a hunch that this newly added focusTrap might be causing this (ankitects/anki#1861) but I haven't looked at the code yet.
Also, I've disabled all other addons before testing ofc!
I've made a video to illustrate the issue:
2022-08-11.at.01.16.34.mp4
The text was updated successfully, but these errors were encountered: