Keep observed scenario scrolling current during async saves

This commit is contained in:
2026-09-06 04:58:45 +03:00
parent 5fa9c905c8
commit e7e37d485d
2 changed files with 112 additions and 0 deletions
+9
View File
@@ -949,6 +949,15 @@ impl App {
])
}
pub fn update(&mut self, message: Message) -> Task<Message> {
// Scrollable geometry can change while async work or an overlay blocks
// commands. Keep the observed translation current; its passive handler
// still validates document, scenario and revision before accepting it.
if matches!(
&message,
Message::ScenarioCanvas(crate::behavior::scenario::CanvasEvent::Scrolled(..))
) {
return self.handle(message);
}
// Global subscriptions also receive keys consumed by an overlay.
if self.model_menu.is_some() && matches!(message, Message::Escape) {
self.model_menu = None;