Skip to content

Check Spelling: Enter and Escape close the dialog like Done (#14179) - #14328

Draft
TrevorBrown-dev wants to merge 1 commit into
storytold:mainfrom
TrevorBrown-dev:fix/check-spelling-enter-escape-14179
Draft

TrevorBrown-dev wants to merge 1 commit into
storytold:mainfrom
TrevorBrown-dev:fix/check-spelling-enter-escape-14179

Conversation

@TrevorBrown-dev

Copy link
Copy Markdown
Contributor

Fixes #14179. With Check Spelling open, Enter and Escape did nothing; now both run Done (the dialog closes and the changes made so far stay), and Enter in Change To does not run Change.

Fix

  • crates/ui-egui/src/panels/type_panels_ui.rs: spelling_window consumes Enter and Escape before the widgets and the canvas see them (only while no modal dialog is above) and runs the same done action as the Done button (close_spelling). Enter on a focused button keeps that button's own action.
  • crates/ui-egui/src/panels.rs: one line, #[cfg(test)] mod type_spell_keys_tests;, next to type_flyout_tests (outside "Where": needed to declare the new test file).

Tab order is not measured and is unchanged.

Verified

crates/ui-egui/src/panels/type_spell_keys_tests.rs, red on main:

  • escape_closes_the_dialog_and_keeps_the_changes_made: Escape closed Check Spelling assertion fails (dialog still open).
  • enter_in_change_to_runs_done_and_does_not_change_the_word: Enter closed Check Spelling assertion fails (dialog still open).
  • enter_with_the_focus_elsewhere_runs_done_too: the dialog is still open.

-p photocraft-ui-egui --lib spell: 19 passed. clippy --all-targets -D warnings and fmt are clean. No local font failure hit this filter.

🤖 Generated with Claude Code -- driver Opus 5.5, implementation Sonnet 5.5 (effort medium)

…d#14179)

spelling_window now consumes Enter and Escape before its widgets and the canvas see them and runs Done (close_spelling), keeping every change made so far. Enter also runs Done while the focus is in Change To (it does not run Change); Enter on a focused button keeps that button's action. Nothing is consumed while a modal dialog sits above.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

BUG-CHECK-SPELLING-ENTER-ESCAPE-CLOSE

1 participant