public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nikhil Mohite <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin]: CodeMirror black screen issue on macOS
Date: Tue, 16 Feb 2021 18:45:38 +0530
Message-ID: <CAOBg0AP0D5SQHveTuM--kBK-=METqJdfAwV=H=+K=3Mpr7cVbA@mail.gmail.com> (raw)
Hi Team,
Please find the patch for the code-mirror black screen issue on SQL and
other tabs that contains code-mirror. This issue is specific to macOS only.
--
*Thanks & Regards,*
*Nikhil Mohite*
*Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*
Attachments:
[application/octet-stream] CodeMirror_issue.patch (1.2K, 3-CodeMirror_issue.patch)
download | inline diff:
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 85c703e2..810ae7c9 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1883,7 +1883,9 @@ define([
this.sqlCtrl.setValue('-- ' + gettext('No updates.'));
}
this.sqlCtrl.refresh.apply(this.sqlCtrl);
+
}
+ this.setCodeMirrorHeight(obj);
},
onPanelResized: function(o) {
if (o && o.container) {
@@ -1914,6 +1916,20 @@ define([
Backform.Control.__super__.remove.apply(this, arguments);
},
+ setCodeMirrorHeight: function(obj) {
+ // Fix for mac os code-mirror showing black screen.
+ var $tabContent = $(
+ '.backform-tab > .tab-content').first(),
+ $sqlPane = $tabContent.find(
+ 'div[role=tabpanel].tab-pane.' + obj.tab.innerText
+ );
+ if ($sqlPane.hasClass('active')) {
+ $sqlPane.find('.CodeMirror').css(
+ 'cssText',
+ 'height: ' + ($tabContent.height() + 8) + 'px !important;'
+ );
+ }
+ }
});
/*
* Numeric input Control functionality just like backgrid
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin]: CodeMirror black screen issue on macOS
In-Reply-To: <CAOBg0AP0D5SQHveTuM--kBK-=METqJdfAwV=H=+K=3Mpr7cVbA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox