fix: ignore key release events during onboarding (#10131)
## Summary - guard onboarding key handling to ignore KeyEventKind::Release - handle key events at the onboarding screen boundary to avoid double-triggering widgets ## Related - https://github.com/ratatui/ratatui/issues/347 ## Testing - cd codex-rs && just fmt - cd codex-rs && cargo test -p codex-tui
This commit is contained in:
parent
b4b4763009
commit
e70592f85a
1 changed files with 3 additions and 0 deletions
|
|
@ -211,6 +211,9 @@ impl OnboardingScreen {
|
|||
|
||||
impl KeyboardHandler for OnboardingScreen {
|
||||
fn handle_key_event(&mut self, key_event: KeyEvent) {
|
||||
if !matches!(key_event.kind, KeyEventKind::Press | KeyEventKind::Repeat) {
|
||||
return;
|
||||
}
|
||||
let is_api_key_entry_active = self.is_api_key_entry_active();
|
||||
let should_quit = match key_event {
|
||||
KeyEvent {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue