mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Blur previous active component after active
This commit is contained in:
@@ -179,8 +179,10 @@ impl View {
|
|||||||
cmp.active();
|
cmp.active();
|
||||||
// Put current focus if any, into the stack
|
// Put current focus if any, into the stack
|
||||||
if let Some(active_component) = self.focus.take() {
|
if let Some(active_component) = self.focus.take() {
|
||||||
// Blur
|
// Blur active component
|
||||||
active_component.blur();
|
if let Some(active_component) = self.components.get_mut(active_component.as_str()) {
|
||||||
|
active_component.blur();
|
||||||
|
}
|
||||||
self.push_to_stack(active_component.as_str());
|
self.push_to_stack(active_component.as_str());
|
||||||
}
|
}
|
||||||
// Give focus to component
|
// Give focus to component
|
||||||
|
|||||||
Reference in New Issue
Block a user