@@ -7,7 +7,7 @@ import { useEventListener } from '@vueuse/core'
77import { computed , h , onMounted , ref , useTemplateRef , watch } from ' vue'
88import { BUILTIN_ENTRY_SETTINGS } from ' ../../constants'
99import { t } from ' ../../i18n'
10- import { docksSplitGroupsBySize , getEntryGroup } from ' ../../state/dock-settings'
10+ import { docksSplitGroupsBySize , getEntryGroup , getPanelViewEntry } from ' ../../state/dock-settings'
1111import { setEdgePositionDropdown , setFloatingTooltip , useDocksGroupPanel , useDocksOverflowPanel , useEdgePositionDropdown } from ' ../../state/floating-tooltip'
1212import { useSettings } from ' ../../state/settings-defaults'
1313import { getEntryPaneKey , useIframePanes } from ' ../../utils/useIframePanes'
@@ -74,13 +74,11 @@ const splitEntries = computed(() => {
7474 return docksSplitGroupsBySize (groupedEntries .value , (isVertical .value ? height : width ) - settingsSize , item , gap , separatorSize )
7575})
7676const selectedEntry = computed (() => context .docks .selected )
77+ // The bar marks the selection only while its panel shows: a toggle action
78+ // hides the panel, and a click on the hidden view then reopens it.
79+ const barSelectedEntry = computed (() => context .panel .session .open ? selectedEntry .value : null )
7780const activeGroup = computed (() => getEntryGroup (context .docks .entries , selectedEntry .value ))
78- const hasPanelContent = computed (() => {
79- const entry = selectedEntry .value
80- return context .panel .session .open
81- && !! entry
82- && entry .type !== ' action'
83- })
81+ const hasPanelContent = computed (() => !! getPanelViewEntry (context ))
8482
8583// Auto-collapse (on by default, opt out via `settings.autoCollapseEdgeToolbar:
8684// false`): idle-timeout + hover tracking, mirroring Dock.vue's own float-bar
@@ -480,7 +478,7 @@ const dragPreviewStyle = computed<CSSProperties | undefined>(() => {
480478 :groups =" splitEntries .visible "
481479 :is-vertical =" isVertical "
482480 :rotate =" false "
483- :selected =" selectedEntry "
481+ :selected =" barSelectedEntry "
484482 @select =" (e ) => context .docks .switchEntry (e ?.id ) "
485483 />
486484 <DockOverflowButton
@@ -489,7 +487,7 @@ const dragPreviewStyle = computed<CSSProperties | undefined>(() => {
489487 :groups =" splitEntries .overflow "
490488 :is-vertical =" false "
491489 :placement =" positionDropdownPlacement [store .position ]"
492- :selected =" selectedEntry "
490+ :selected =" barSelectedEntry "
493491 @select =" (e ) => context .docks .switchEntry (e ?.id ) "
494492 @activity =" bringUp "
495493 />
@@ -503,7 +501,7 @@ const dragPreviewStyle = computed<CSSProperties | undefined>(() => {
503501 :context =" context "
504502 :entries =" settingsEntries "
505503 :is-vertical =" false "
506- :selected =" selectedEntry "
504+ :selected =" barSelectedEntry "
507505 @select =" (e ) => context .docks .switchEntry (e ?.id ) "
508506 />
509507 </div >
0 commit comments