Skip to content

Commit 256d1e5

Browse files
Fixed an issue where doing Ctrl/Cmd+C on a selected text in a cell editor of data output in the query tool copied the complete text. #8157
1 parent c2dcfdb commit 256d1e5

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

docs/en_US/release_notes_8_14.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ New features
2424
| `Issue #3751 <https://github.com/pgadmin-org/pgadmin4/issues/3751>`_ - Show auto-complete column names in filtered rows dialog of table and filter options of view/edit data tool.
2525
| `Issue #5786 <https://github.com/pgadmin-org/pgadmin4/issues/5786>`_ - Allow the use of a pgpass file in the pgAdmin container via Docker secrets.
2626
| `Issue #6592 <https://github.com/pgadmin-org/pgadmin4/issues/6592>`_ - Fixed multiple issues and improved ERD auto-layout.
27+
| `Issue #6794 <https://github.com/pgadmin-org/pgadmin4/issues/6794>`_ - Add support for passing connection details as placeholders in the passexec command.
2728
| `Issue #7330 <https://github.com/pgadmin-org/pgadmin4/issues/7330>`_ - Add support to deploy pgAdmin in a container with readOnlyRootFilesystem to true.
2829
| `Issue #8095 <https://github.com/pgadmin-org/pgadmin4/issues/8095>`_ - Added support for a builtin locale provider in the Database dialog.
2930
@@ -44,4 +45,5 @@ Bug fixes
4445
| `Issue #8098 <https://github.com/pgadmin-org/pgadmin4/issues/8098>`_ - Fixed an issue in schema diff where an error message popup was showing some garbage without any info.
4546
| `Issue #8127 <https://github.com/pgadmin-org/pgadmin4/issues/8127>`_ - Fixed an issue where query tool should not prompt for unsaved changes when there are no changes.
4647
| `Issue #8134 <https://github.com/pgadmin-org/pgadmin4/issues/8134>`_ - Add a user preference to enable/disable alternating row background colors in the data output of query tool.
48+
| `Issue #8157 <https://github.com/pgadmin-org/pgadmin4/issues/8157>`_ - Fixed an issue where doing Ctrl/Cmd+C on a selected text in a cell editor of data output in the query tool copied the complete text.
4749
| `Issue #8158 <https://github.com/pgadmin-org/pgadmin4/issues/8158>`_ - Fixed an issue where auto-width of wide columns in data output is incorrectly calculated.

web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/index.jsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,8 @@ function initialiseColumns(columns, rows, totalRowCount, columnWidthBy) {
274274
for(const col of retColumns) {
275275
col.width = getColumnWidth(col, rows, canvasContext, columnWidthBy);
276276
col.resizable = true;
277-
col.renderEditCellOptions = {
277+
col.editorOptions = {
278278
commitOnOutsideClick: false,
279-
onCellKeyDown: (e)=>{
280-
// global keyboard shortcuts will work now and will open the the editor for the cell once pgAdmin reopens
281-
if(!e.metaKey && !e.altKey && !e.shiftKey && !e.ctrlKey){
282-
/* Do not open the editor */
283-
e.preventDefault();
284-
}
285-
}
286279
};
287280
setEditorFormatter(col);
288281
}
@@ -393,12 +386,6 @@ export default function QueryToolDataGrid({columns, rows, totalRowCount, dataCha
393386
}
394387

395388
function handleShortcuts(e) {
396-
// Handle Copy shortcut Cmd/Ctrl + c
397-
if((e.ctrlKey || e.metaKey) && e.key !== 'Control' && e.keyCode == 67) {
398-
e.preventDefault();
399-
handleCopy();
400-
}
401-
402389
// Handle Select All Cmd + A(mac) / Ctrl + a (others)
403390
if(((isMac() && e.metaKey) || (!isMac() && e.ctrlKey)) && e.key === 'a') {
404391
e.preventDefault();

0 commit comments

Comments
 (0)