input: typing behind an open dialog stays out of the command line

With Quick Select or another dialog open, letters typed while one of
its lists was open went to the command line behind it (#922). Typed
glyphs are now dropped while a dialog is up; its own text fields keep
receiving them as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-15 09:23:21 +03:00
1 parent cc78899363
commit c8aa179ec0
1 file changed
+5
+5
View File
@@ -302,6 +302,11 @@ impl OpenCADStudio {
}
return Task::none();
}
// A dialog owns the keyboard: typing while one is open (an open list
// in it included) must not land in the command line behind it.
if self.active_modal.is_some() || self.qselect.is_some() {
return Task::none();
}
// Filter out control characters — only push the typed
// glyph(s). `Tab`, etc. arrive as Named keys, not here.
if s.chars().all(|c| !c.is_control()) {