File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/renderer/src/components/views Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -792,6 +792,7 @@ vue.onMounted(() => {
792792// Various things that need to be done once we are is mounted.
793793
794794const crtInstance = vue .getCurrentInstance ();
795+ const windowIsFocused = vueusecore .useWindowFocus ();
795796
796797vue .onMounted (() => {
797798 // Customise our IDs.
@@ -839,6 +840,21 @@ vue.onMounted(() => {
839840
840841 mutationObserver .observe (document .documentElement , { attributes: true , attributeFilter: [' style' ] });
841842
843+ // Close popovers when the window loses focus.
844+
845+ vue .watch (
846+ () => windowIsFocused .value ,
847+ (isFocused ) => {
848+ if (! isFocused ) {
849+ interactiveLiveRunColorPopover .value ?.hide ();
850+
851+ if (interactiveRunColorPopoverIndex .value !== - 1 ) {
852+ closeRunColorPopover (interactiveRunColorPopoverIndex .value );
853+ }
854+ }
855+ }
856+ );
857+
842858 // Disconnect our observers when unmounting.
843859
844860 vue .onUnmounted (() => {
You can’t perform that action at this time.
0 commit comments