Skip to content

Disable anki add button for 2.5s after click#2279

Merged
Kuuuube merged 2 commits intoyomidevs:masterfrom
Kuuuube:debounce-anki-add
Feb 11, 2026
Merged

Disable anki add button for 2.5s after click#2279
Kuuuube merged 2 commits intoyomidevs:masterfrom
Kuuuube:debounce-anki-add

Conversation

@Kuuuube
Copy link
Copy Markdown
Member

@Kuuuube Kuuuube commented Jan 4, 2026

Stops the user from accidentally double clicking the button or accidentally pressing the add hotkey twice. Button re-enable obv doesn't apply unless dupes/overwrite is allowed.

2.5s seems sane here to me but open to suggestions if this seems too much. If the user scans a word, adds it, scans another. Since the button is re-rendered, the second popup doesn't have any extra delay on adding.

Considered disabling then re-enabling after the card is created. But in some cases this could happen so fast that a user could still accidentally double click and end up adding two cards.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/anki The issue or PR is related to Anki integration area/ui-ux The issue or PR is related to UI/UX/Design kind/enhancement The issue or PR is a new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants