mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow text selection/copying from disabled CodeMirror instances. Fixes #2309
This commit is contained in:
committed by
Dave Page
parent
4d072ff781
commit
7471dea458
@@ -601,4 +601,9 @@ input.editor-checkbox:focus {
|
||||
.ajs-body .warn-footer {
|
||||
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;
|
||||
}
|
||||
|
@@ -2019,12 +2019,12 @@ define('tools.querytool', [
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Disable codemirror by setting cursor to nocursor and background to dark.
|
||||
// Disable codemirror by setting readOnly option to true, background to dark, and cursor, hidden.
|
||||
self.init_events();
|
||||
self.gridView.query_tool_obj.setOption('readOnly', 'nocursor');
|
||||
self.gridView.query_tool_obj.setOption('readOnly', true);
|
||||
var cm = self.gridView.query_tool_obj.getWrapperElement();
|
||||
if (cm) {
|
||||
cm.className += ' bg-gray-1 opacity-5';
|
||||
cm.className += ' bg-gray-1 opacity-5 hide-cursor-workaround';
|
||||
}
|
||||
self.disable_tool_buttons(true);
|
||||
self.execute_data_query();
|
||||
|
Reference in New Issue
Block a user