mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the Query Editor should be focused when switching between query tool tabs. Fixes #7441
This commit is contained in:
committed by
Akshay Joshi
parent
ea3203f466
commit
725726f083
@@ -318,6 +318,17 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN
|
||||
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.WARN_SAVE_DATA_CLOSE);
|
||||
});
|
||||
|
||||
panel?.on(window.wcDocker.EVENT.VISIBILITY_CHANGED, function() {
|
||||
/* Focus the appropriate panel on visible */
|
||||
if(panel.isVisible()) {
|
||||
if(LayoutHelper.isTabVisible(docker.current, PANELS.QUERY)) {
|
||||
LayoutHelper.focus(docker.current, PANELS.QUERY);
|
||||
} else if(LayoutHelper.isTabVisible(docker.current, PANELS.HISTORY)) {
|
||||
LayoutHelper.focus(docker.current, PANELS.HISTORY);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
pgAdmin.Browser.Events.on('pgadmin-storage:finish_btn:select_file', (fileName)=>{
|
||||
eventBus.current.fireEvent(QUERY_TOOL_EVENTS.LOAD_FILE, fileName);
|
||||
}, pgAdmin);
|
||||
|
||||
Reference in New Issue
Block a user