mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
A data validation alert is the general message box, drawn over the cell editor, which stays open so the entry can be fixed. The editor read Enter and Esc first: the first Esc cancelled the edit behind the alert and only the second closed it, and Enter tried the entry again so the alert came back. The editor now skips its own key handling while a message is open over it, so Esc and Enter close the alert (like its OK button). The message box also had the keyboard focus and didn't give it back, so typing went nowhere until the cell was clicked; closing it now asks the open editor for focus again. Tests: ui-egui tests/validation_alert.rs esc_closes_a_validation_alert_and_leaves_the_entry and enter_closes_a_validation_alert_and_leaves_the_entry (both fail on main, and without the focus change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>