Fix Div::active not working
Somehow a condition got inverted and caused the bug.
This commit is contained in:
parent
35670368a5
commit
e53b9f5ccf
2 changed files with 3 additions and 1 deletions
|
@ -984,7 +984,7 @@ impl Interactivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
let active_state = element_state.clicked_state.clone();
|
let active_state = element_state.clicked_state.clone();
|
||||||
if !active_state.borrow().is_clicked() {
|
if active_state.borrow().is_clicked() {
|
||||||
cx.on_mouse_event(move |_: &MouseUpEvent, phase, cx| {
|
cx.on_mouse_event(move |_: &MouseUpEvent, phase, cx| {
|
||||||
if phase == DispatchPhase::Capture {
|
if phase == DispatchPhase::Capture {
|
||||||
*active_state.borrow_mut() = ElementClickedState::default();
|
*active_state.borrow_mut() = ElementClickedState::default();
|
||||||
|
|
|
@ -66,9 +66,11 @@ impl Render for FocusStory {
|
||||||
let color_4 = theme.status().conflict;
|
let color_4 = theme.status().conflict;
|
||||||
let color_5 = theme.status().ignored;
|
let color_5 = theme.status().ignored;
|
||||||
let color_6 = theme.status().renamed;
|
let color_6 = theme.status().renamed;
|
||||||
|
let color_7 = theme.status().hint;
|
||||||
|
|
||||||
div()
|
div()
|
||||||
.id("parent")
|
.id("parent")
|
||||||
|
.active(|style| style.bg(color_7))
|
||||||
.track_focus(&self.parent_focus)
|
.track_focus(&self.parent_focus)
|
||||||
.key_context("parent")
|
.key_context("parent")
|
||||||
.on_action(cx.listener(|_, _action: &ActionA, _cx| {
|
.on_action(cx.listener(|_, _action: &ActionA, _cx| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue