Im-Beast / deno_tui

🦕 Deno module for creating Terminal User Interfaces
https://deno.land/x/tui
MIT License
266 stars 18 forks source link

bug: Textbox recaptures keystrokes after Enter #13

Closed aapoalas closed 1 year ago

aapoalas commented 1 year ago

Bug description If multiple Textbox components are rendered at the same time, then editing a multi-line one first and then a single-line one makes Enter-presses start editing both.

Expected behavior Pressing Enter in a single-line Textbox should commit the changed text (?); A Textbox should not restart editing when Enter is pressed after it has been deselected.

Reproduction Run examples/demo.ts. Click into the multi-line Textbox and input something. Then click outside it to deselect it. Press Enter. Deselect again, and click into one of the single-line Textboxes. Press Enter and start writing.

Screenshots image

Information (please complete)