mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-16 18:25:12 -06:00
Fix intermittent CodeMirror rendering issue. Fixes #1399
This commit is contained in:
parent
5d0c160fb8
commit
9396cb03d5
@ -329,6 +329,10 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
obj.editor.refresh();
|
||||||
|
}, 10);
|
||||||
|
|
||||||
// Initialise the treeview
|
// Initialise the treeview
|
||||||
$('#tree').aciTree({
|
$('#tree').aciTree({
|
||||||
ajax: {
|
ajax: {
|
||||||
|
@ -24,7 +24,7 @@ function(_, $, pgBrowser) {
|
|||||||
this.sqlPanelVisibilityChanged
|
this.sqlPanelVisibilityChanged
|
||||||
);
|
);
|
||||||
|
|
||||||
// Hmm.. Did we find the SQL panel, and is it visible (openned)?
|
// Hmm.. Did we find the SQL panel, and is it visible (opened)?
|
||||||
// If that is the case - we need to listen the browser tree selection
|
// If that is the case - we need to listen the browser tree selection
|
||||||
// events.
|
// events.
|
||||||
if (sqlPanels.length == 0) {
|
if (sqlPanels.length == 0) {
|
||||||
@ -52,9 +52,8 @@ function(_, $, pgBrowser) {
|
|||||||
* through. We will wait for some time before fetching the Reversed
|
* through. We will wait for some time before fetching the Reversed
|
||||||
* Engineering SQL.
|
* Engineering SQL.
|
||||||
**/
|
**/
|
||||||
if (this.timeout) {
|
this.timeout && clearTimeout(this.timeout);
|
||||||
clearTimeout(this.timeout);
|
|
||||||
}
|
|
||||||
this.timeout = setTimeout(
|
this.timeout = setTimeout(
|
||||||
function() {
|
function() {
|
||||||
var sql = '';
|
var sql = '';
|
||||||
@ -78,10 +77,8 @@ function(_, $, pgBrowser) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
var e = pgAdmin.Browser.editor;
|
|
||||||
e.refresh.apply(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sql != '') {
|
if (sql != '') {
|
||||||
pgAdmin.Browser.editor.setValue(sql);
|
pgAdmin.Browser.editor.setValue(sql);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user