This is more similar to zed1's behaviour, and allows us to work around the difficulty in defining `on_mouse_down_out` for modals that have overlays.
This is more similar to zed1's behaviour, and allows us to work around the difficulty in defining `on_mouse_down_out` for modals that have overlays.