Skip to content

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.

Copy link

github-actions bot commented Mar 5, 2025

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant