diff --git a/core/client/components/layout/KWindow.vue b/core/client/components/layout/KWindow.vue index 19db9aa80..6e4803581 100644 --- a/core/client/components/layout/KWindow.vue +++ b/core/client/components/layout/KWindow.vue @@ -207,7 +207,7 @@ const headerControls = computed(() => { size: 'sm', tooltip: 'KWindow.RESTORE_ACTION', visible: currentWindow.controls.restore && currentWindow.state === 'maximized', - handler: () => Layout.setWindowState(props.placement, LocalStorage.get(getStorageKey('restore-state'))) + handler: () => Layout.setWindowState(props.placement, LocalStorage.get(getStorageKey('restore-state')) || 'pinned') }, { id: `close-${props.placement}-window`, icon: 'las la-times', @@ -408,8 +408,9 @@ function onFooterResized (size) { } // restore the state +const currentState = currentWindow.state const fallbackState = readState() || 'pinned' -Layout.setWindowState(props.placement, fallbackState) +refresh(currentState || fallbackState)