mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: make splitter state key position-aware to prevent shared widths between left and right panels
When sidebar location is set to right, left-side panels (e.g. Workflow overview) and right-side panels (e.g. Job History) were sharing the same PrimeVue Splitter state key, causing them to apply each other's widths. Include sidebarLocation and offside panel visibility in the state key so each layout configuration persists its own panel sizes independently. Fixes #9440 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -167,13 +167,19 @@ const sidebarPanelVisible = computed(
|
||||
() => activeSidebarTab.value !== null && !isBuilderMode.value
|
||||
)
|
||||
|
||||
const sidebarStateKey = computed(() => {
|
||||
const sidebarTabKey = computed(() => {
|
||||
return unifiedWidth.value
|
||||
? 'unified-sidebar'
|
||||
: // When no tab is active, use a default key to maintain state
|
||||
(activeSidebarTabId.value ?? 'default-sidebar')
|
||||
})
|
||||
|
||||
const sidebarStateKey = computed(() => {
|
||||
const base = sidebarTabKey.value
|
||||
const suffix = showOffsideSplitter.value ? '-with-offside' : ''
|
||||
return `${base}-${sidebarLocation.value}${suffix}`
|
||||
})
|
||||
|
||||
/**
|
||||
* Avoid triggering default behaviors during drag-and-drop, such as text selection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user