From df4cdc5801a2c27a07bbdc31b5ec324e68c27861 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 12:02:04 +0530 Subject: [PATCH] fix: resolve 4 bugs in termui --- examples/forms-and-validation/src/index.tsx | 2 +- examples/showcase/src/index.tsx | 2 +- packages/ui/src/Form.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/forms-and-validation/src/index.tsx b/examples/forms-and-validation/src/index.tsx index e8a9bb4ea..4ac42a672 100644 --- a/examples/forms-and-validation/src/index.tsx +++ b/examples/forms-and-validation/src/index.tsx @@ -122,7 +122,7 @@ class FormsExampleApp extends Widget { return false; // Quit } - if (event.key === 'c' && event.ctrl === false) { + if (event.key === 'c' && event.ctrl !) { this.modal.show(); return true; } diff --git a/examples/showcase/src/index.tsx b/examples/showcase/src/index.tsx index 444be6698..47a52a3e3 100644 --- a/examples/showcase/src/index.tsx +++ b/examples/showcase/src/index.tsx @@ -128,7 +128,7 @@ class ShowcaseApp extends Widget { if (event.key === 'q' || (event.ctrl && event.key === 'c')) return false; // Tab switching: 1-5 - const num = parseInt(event.key); + const num = parseInt(event.key, 10); if (num >= 1 && num <= 5) { this.switchTab(num - 1); return true; diff --git a/packages/ui/src/Form.ts b/packages/ui/src/Form.ts index bf96ede6b..38d630037 100644 --- a/packages/ui/src/Form.ts +++ b/packages/ui/src/Form.ts @@ -138,3 +138,5 @@ export class Form extends Widget { } } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file