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:
Ilya Bogdanov 2023-09-12 14:28:13 +04:00 committed by GitHub
parent 3445327581
commit 6fd2295cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();