Tabbed: correctly pass events to other children
When passing an event to the focused tab and it is not handled, the other children weren't then each called to see if they handle the event. That led to refresh events etc not being processed by the mail list tab if it wasn't focused.async
parent
4ae7a57d45
commit
c4bc7be5d1
|
@ -1864,7 +1864,14 @@ impl Component for Tabbed {
|
|||
}
|
||||
_ => {}
|
||||
}
|
||||
self.children[self.cursor_pos].process_event(event, context)
|
||||
let c = self.cursor_pos;
|
||||
self.children[c].process_event(event, context)
|
||||
|| self.children.iter_mut().enumerate().any(|(idx, child)| {
|
||||
if idx == c {
|
||||
return false;
|
||||
}
|
||||
child.process_event(event, context)
|
||||
})
|
||||
}
|
||||
fn is_dirty(&self) -> bool {
|
||||
self.dirty || self.children[self.cursor_pos].is_dirty()
|
||||
|
|
Loading…
Reference in New Issue