Skip to content

fix: resolve Typing Speed Tester uninitialized input and hidden buttons#590

Merged
steam-bell-92 merged 2 commits into
steam-bell-92:mainfrom
Mudita-Singh:fix-typing-speed-input
May 22, 2026
Merged

fix: resolve Typing Speed Tester uninitialized input and hidden buttons#590
steam-bell-92 merged 2 commits into
steam-bell-92:mainfrom
Mudita-Singh:fix-typing-speed-input

Conversation

@Mudita-Singh
Copy link
Copy Markdown
Contributor

📝 Description

This PR successfully resolves GitHub Issue #525: "Typing Speed Tester does not accept user input after starting the test".

Key Fixes:

  1. Resolved Eager ReferenceError Crashes on Page Load (web-app/js/projects.js):

    • Refactored the core initializeProject(projectName) registry function to map keys to initializer function name strings (e.g. 'typing-speed-tester': 'initTypingSpeedTester').
    • Resolved functions dynamically off the global window object (window[initializerName]()) only if they are loaded. This completely prevents browser-level ReferenceError crashes on pages that only load a subset of scripts (like utilities.html, games.html, math.html).
    • Cleaned up the file by deleting a redundant duplicate initializeProject declaration at the top.
  2. Fixed Button Visibility Collision (web-app/js/projects/typing-speed-tester.js):

    • The "Start Test 🚀" and "New Sentence" buttons inside the Typing Speed Tester template were previously set to class="btn-play".
    • In css/styles.css, .btn-play has a global style of display: none; (used to hide play overlay icons on cards). This caused the buttons inside the tester modal to be completely invisible, preventing users from ever starting the test.
    • Renamed the button classes to class="btn-tester-action", allowing them to render visibly.
  3. Loaded Missing Script Files (web-app/utilities.html):

    • Added explicit loads for the showcased projects: number-converter.js and typing-speed-tester.js right before projects.js.

Screenshots
image

image

🔗 Linked Issue

Closes #525


📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@Mudita-Singh is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@steam-bell-92 steam-bell-92 merged commit 5e0f686 into steam-bell-92:main May 22, 2026
5 of 6 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Typing Speed Tester does not accept user input after starting the test

2 participants