Skip to content

Conversation

@GOLLASAISREE
Copy link
Owner

Fixes CodeYourFuture#1072

This PR resolves the issue where pressing left/right arrow keys in textareas on the prep view triggers navigation instead of moving the cursor within the textarea.

What does this change?

This PR modifies the handleKeydown function in common-theme/assets/scripts/solo-view.js to check if the event target is an editable element (TEXTAREA, INPUT, SELECT, or contentEditable) before triggering navigation. If the user is typing in an editable element, the function returns early, allowing the default browser behavior (cursor movement) instead of triggering page navigation.

Common Content?

  • Block/s

Common Theme?

  • Yes

Issue number: CodeYourFuture#1072

Org Content?

N/A

Checklist

  • I have read the contributing guidelines
  • I have checked my spelling and grammar with an automated tool
  • I have previewed my changes to check the markdown renders as I intend
  • I have run my code to check it works
  • My changes follow our Style Guide

Who needs to know about this?

This fixes a bug that was affecting users trying to type in textareas on prep pages. The previous PR CodeYourFuture#1445 attempted to fix this but was unsuccessful. This implementation properly handles all editable elements.

Prevent navigation when typing in editable elements.
@GOLLASAISREE GOLLASAISREE merged commit 66d62b0 into main Oct 29, 2025
@GOLLASAISREE GOLLASAISREE deleted the fix-arrow-keys-textarea-issue-1072 branch October 30, 2025 03:19
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.

Pressing left and right arrows in a text field in the prep view does navigation

2 participants