Refresh the SQL control, whenever necessary.

Also, remove the CodeMirror object for better clean up process.

When a SQL control/tab is rendered in a hidden element, it does not
render really well. Because - it rely on the height, and width of the
container to count the gutten position, and margin, and other elements.

Hence - whenever the tab, panel becomes visible, we will refresh the
control.
This commit is contained in:
Ashesh Vashi
2016-04-22 15:24:18 +05:30
parent a5aa6d159a
commit 085ce50545
4 changed files with 45 additions and 15 deletions

View File

@@ -78,6 +78,9 @@ function(_, $, pgBrowser) {
}
});
}
} else {
var e = pgAdmin.Browser.editor;
e.refresh.apply(e);
}
if (sql != '') {
pgAdmin.Browser.editor.setValue(sql);