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

Plugin keyboard shorcut keys do not work in Obsidian notes after reviewing flahscards [BUG] #907

Open
Ivix42 opened this issue Mar 20, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@Ivix42
Copy link

Ivix42 commented Mar 20, 2024

Describe the bug
After reviewing daily flashcards, the plugin designated shortcut keys, "1", "2", "3", "s", and "space" do not function in obsidian without restarting the app. No issues with keys in other apps.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Review Flashcards
  2. Review all flashcards
  3. Return to any other obsidian note.
  4. See error

Expected behavior
Keys should still work in obsidian after reviewing flashcards.

Screenshots
If applicable, add screenshots to help explain the bug. This could be the logs in the developer console (CTRL + SHIFT + i).

Versions (please complete the following information):

  • OS: Win 11
  • Obsidian version: 1.5.11
  • Plugin version: 1.12.0
  • If on desktop, Installer version: [run this.navigator.appVersion on the developer console, e.g. 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/0.12.3 Chrome/89.0.4389.128 Electron/12.0.6 Safari/537.36"]

Additional context
Add any other context about the problem here (e.g. the markdown producing the error).

@Ivix42 Ivix42 added the bug Something isn't working label Mar 20, 2024
@Xeretis
Copy link

Xeretis commented Mar 20, 2024

I'm also experiencing this

@ronzulu
Copy link
Collaborator

ronzulu commented Mar 20, 2024

Hey @KyleKlus, this might be your area of expertise, would you have a chance to look into this?

Cheers
Ronny

@KyleKlus
Copy link
Contributor

Yes, I found the problem and I'll try to fix it as quick as possible, as this is quite a bad one, if it locks the keys 🙄

@KyleKlus
Copy link
Contributor

Alright, I noticed, I already fixed the bug by accident in my UI overhaul in PR #899. As it is already approved by st3v3nmw and merge ready, it would be just easier to wait until it'll be merged.

@st3v3nmw
Copy link
Owner

Merged #899, please try it out.

@Ivix42
Copy link
Author

Ivix42 commented Mar 20, 2024

The "s" and "space" key are still locked. The 1-3 keys work a few times and then locked as well.

@KyleKlus
Copy link
Contributor

KyleKlus commented Mar 21, 2024

Alright, then I need to look deeper into what causes this, as I thought that it was fixed by removing the key listener after it isn't needed.

I may also want to look into how other plugins do the key listeners, so that we could even make the keys reconfigureable in the hotkeys section.

I'll try to fix this as soon as possible.

@KyleKlus
Copy link
Contributor

KyleKlus commented Mar 24, 2024

I am very sorry, but I can't reproduce the bug. Everything works fine for me. And I've looked through the code, if there is a possibility that the remove event listener function isn't called, but as long as the modal closes, then the event handler is also removed.

Can someone else but me recreate this?

@Ivix42
Copy link
Author

Ivix42 commented Mar 27, 2024

Just double checked after troubleshooting other plugins. Appears to be a good fix now. Thanks for the work on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

5 participants