Skip to content

Commit

Permalink
Do not lose focus when clicking fullscreen visualization (#7782)
Browse files Browse the repository at this point in the history
Fixes #7524

The issue was caused by the fact that fullscreen visualization does not have hover area, so clicking anywhere was deactivating it because we used `deselect_click = scene.on_event::<mouse::Down>();`


https://github.com/enso-org/enso/assets/6566674/08a463f3-764f-4b2c-b41f-13521f5cfc56
  • Loading branch information
vitvakatu authored Sep 12, 2023
1 parent 3445327 commit 6fd2295
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,9 @@ impl Container {
let scene_clicked = scene.on_event::<mouse::Down>();
frp::extend! { network
selected_by_click <- viz_clicked.map(f_!(model.activate()));
deselected_by_click <- scene_clicked.map(f!([model](event) model.deactivated_by_click(event)));
is_fullscreen <- output.view_state.map(|s| s.is_fullscreen());
deselect_click <- scene_clicked.gate_not(&is_fullscreen);
deselected_by_click <- deselect_click.map(f!([model](event) model.deactivated_by_click(event)));
selected <- selected_by_click.on_true();
deselected <- deselected_by_click.on_true();
is_selected <- bool(&deselected, &selected).on_change();
Expand Down

0 comments on commit 6fd2295

Please sign in to comment.