Skip to content

fix: touchend.prevent blocked all key taps after diacritic popup#181

Merged
Hugo0 merged 1 commit intomainfrom
hotfix/touchend-fix
Mar 19, 2026
Merged

fix: touchend.prevent blocked all key taps after diacritic popup#181
Hugo0 merged 1 commit intomainfrom
hotfix/touchend-fix

Conversation

@Hugo0
Copy link
Owner

@Hugo0 Hugo0 commented Mar 19, 2026

Problem

After using the diacritic long-press popup on mobile, ALL subsequent key taps stopped working — even on different pages. The keyboard became completely unresponsive.

Root Cause

@touchend.prevent on KeyboardKey.vue unconditionally called preventDefault() on every key's touchend event. This prevented the browser from generating the subsequent click event. Since handleClick is where key presses are emitted, no letters could be typed after any touch interaction.

Fix

Changed @touchend.prevent="handleTouchEnd" to @touchend="handleTouchEnd" and moved e.preventDefault() inside the handler, only calling it when the popup was actually shown and used. Normal key taps now complete the full touch→click cycle.

Test plan

  • All 150 vitest tests pass
  • All 4 diacritic E2E tests pass
  • Manual: tap keys on mobile after using diacritic popup — should work normally
  • Manual: long-press diacritic key, select variant, then tap normal keys — should work

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Warning

Rate limit exceeded

@Hugo0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 65815b4d-c6d7-4e31-a631-b4e0b02108a7

📥 Commits

Reviewing files that changed from the base of the PR and between 6e11c65 and 0dff5df.

📒 Files selected for processing (1)
  • components/game/KeyboardKey.vue
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/touchend-fix
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Hugo0 Hugo0 merged commit d7f2369 into main Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant