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

Fixed Issue #1346 child node selection, added last word handling, removed u… #1350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saikishoreMSK
Copy link

…nnecessary span spaces, and added element existence checks

Description

This pull request addresses multiple issues in the typing game code, including:

  1. Child Node Selection:
  • Replaced childNodes with children in quoteElement to ensure only element nodes are selected, avoiding interference from text nodes.
  1. Handling the Last Word:
  • Added logic to handle the case when the last word is correctly typed. The game now displays a completion message and disables further input.
  1. UI Element Existence Check:
  • Added checks to ensure quoteElement, messageElement, and typedValueElement exist in the DOM before manipulation, preventing potential runtime errors.
  1. Removed Extra Spaces in span Elements:
  • Removed unnecessary spaces in generated elements for each word, ensuring accurate highlighting without display issues.

…removed unnecessary span spaces, and added element existence checks
Copy link

This PR has not seen any action for a while! Closing for now, but it can be reopened at a later date.

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