mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 07:51:56 +03:00
Do not lose focus when clicking fullscreen visualization (#7782)
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
This commit is contained in:
parent
3445327581
commit
6fd2295cc6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user