Skip to content

fix: ScrollableTextArea exit not responding to key press - #2713

Open
Yihong89 wants to merge 1 commit into
BruceDevices:mainfrom
Yihong89:fix/scrollable-textarea-exit
Open

fix: ScrollableTextArea exit not responding to key press#2713
Yihong89 wants to merge 1 commit into
BruceDevices:mainfrom
Yihong89:fix/scrollable-textarea-exit

Conversation

@Yihong89

@Yihong89 Yihong89 commented Jul 26, 2026

Copy link
Copy Markdown

Description

The ScrollableTextArea show() function (used by Host Info screen) could become unresponsive to the Enter key due to a race condition with the input handler.

Root Cause

The check() function suspends the input handler task (xHandle) for ~10ms each time it is called. In ScrollableTextArea::show(), the update() function calls check() multiple times (PrevPress, NextPress) before each draw(), creating brief windows where keyboard input is not being scanned. A quick tap of Enter during one of these suspension windows was silently swallowed, making the screen appear frozen.

Fix

  1. Added delay(200) before the wait loop to drain any buffered input after the content is displayed
  2. Added EscPress exit path — pressing the ESC key now also exits the screen, giving a reliable fallback

Testing

  • Open Host Info from Scan Hosts menu
  • Press Enter to exit — should return to host options menu
  • Press ESC to exit — should also work

The check() function suspends the input handler task (xHandle) for ~10ms
each time it is called. In ScrollableTextArea::show(), the update()
function calls check() multiple times, creating brief windows where
keyboard input is not being scanned. A quick tap of Enter during one
of these suspension windows was silently swallowed, making the screen
appear unresponsive.

Fixed by:
- Adding a 200ms delay before the wait loop to drain any buffered input
- Adding EscPress as an alternative exit path (ESC key)
@bmorcelli bmorcelli added enhancement New feature or request BugFixes labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BugFixes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants