Skip to content

Commit bbef00a

Browse files
committed
Fixed an issue where the scroll position in the Object Explorer was not retained when switching workspaces. #8497
1 parent 627aa5d commit bbef00a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/en_US/release_notes_9_3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ Bug fixes
3131
*********
3232

3333
| `Issue #8443 <https://github.com/pgadmin-org/pgadmin4/issues/8443>`_ - Fixed an issue where the debugger hangs when stepping into nested function/procedure.
34+
| `Issue #8497 <https://github.com/pgadmin-org/pgadmin4/issues/8497>`_ - Fixed an issue where the scroll position in the Object Explorer was not retained when switching workspaces.
3435
| `Issue #8556 <https://github.com/pgadmin-org/pgadmin4/issues/8556>`_ - Ensure that graph data is updated even when the Dashboard tab is inactive.

web/pgadmin/misc/workspaces/static/js/WorkspaceProvider.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ export function WorkspaceProvider({children}) {
7272
pgAdmin.Browser.docker.currentWorkspace = newVal;
7373
if (newVal == WORKSPACES.DEFAULT) {
7474
setTimeout(() => {
75-
pgAdmin.Browser.tree.selectNode(lastSelectedTreeItem.current);
75+
pgAdmin.Browser.tree.selectNode(lastSelectedTreeItem.current, true, 'center');
7676
lastSelectedTreeItem.current = null;
77-
}, 0);
77+
}, 250);
7878
} else {
7979
// Get the selected tree node and save it into the state variable.
8080
let selItem = pgAdmin.Browser.tree.selected();
@@ -92,7 +92,7 @@ export function WorkspaceProvider({children}) {
9292
if (wsConfig?.enableOnNoTabs) {
9393
return true;
9494
}
95-
95+
9696
if(wsConfig) {
9797
return Boolean(pgAdmin.Browser.docker[wsConfig.docker]?.layoutObj?.getLayout()?.dockbox?.children?.[0]?.tabs?.length);
9898
}

0 commit comments

Comments
 (0)