mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow copying of SQL from the dashboard tables. Fixes #3137
This commit is contained in:
committed by
Dave Page
parent
7471dea458
commit
0c48b79ce7
@@ -81,3 +81,8 @@
|
||||
.sql_textarea .CodeMirror-scroll {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* workaround for codemirrors 'readOnly' option which is set to true instead of 'noCursor' */
|
||||
.hide-cursor-workaround .CodeMirror-cursors {
|
||||
display: none;
|
||||
}
|
||||
|
@@ -2103,10 +2103,11 @@ define([
|
||||
|
||||
// Disable editor
|
||||
if (isDisabled) {
|
||||
self.sqlCtrl.setOption('readOnly', 'nocursor');
|
||||
// set read only mode to true instead of 'nocursor', and hide cursor using a class so that copying is enabled
|
||||
self.sqlCtrl.setOption('readOnly', true);
|
||||
var cm = self.sqlCtrl.getWrapperElement();
|
||||
if (cm) {
|
||||
cm.className += ' cm_disabled';
|
||||
cm.className += ' cm_disabled hide-cursor-workaround';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -602,8 +602,3 @@ input.editor-checkbox:focus {
|
||||
font-size: 13px;
|
||||
line-height: 3em;
|
||||
}
|
||||
|
||||
/* workaround for codemirrors 'readOnly' option which is set to true instead of 'noCursor' */
|
||||
.hide-cursor-workaround .CodeMirror-cursors {
|
||||
display: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user