From 043025d1eb57b586da5eaf32f49655c180b95716 Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Fri, 24 Jul 2020 14:30:22 +0530 Subject: [PATCH] Fixed an issue where the user is not able to save the new row if the table is empty. Fixes #4810 --- docs/en_US/release_notes_4_25.rst | 1 + web/pgadmin/tools/sqleditor/static/js/sqleditor.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docs/en_US/release_notes_4_25.rst b/docs/en_US/release_notes_4_25.rst index 4fc223739..5da181f5b 100644 --- a/docs/en_US/release_notes_4_25.rst +++ b/docs/en_US/release_notes_4_25.rst @@ -18,4 +18,5 @@ Housekeeping Bug fixes ********* +| `Issue #4810 `_ - Fixed an issue where the user is not able to save the new row if the table is empty. | `Issue #5646 `_ - Ensure that RLS Policy node should be searchable using search object. \ No newline at end of file diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index f1c3b245b..61e1f9cf4 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -1086,6 +1086,14 @@ define('tools.querytool', [ } }); + // Handles blur event for slick grid cell + $('.slick-viewport').on('blur', 'input.editor-text', function () { + window.setTimeout(function() { + if (Slick.GlobalEditorLock.isActive()) + Slick.GlobalEditorLock.commitCurrentEdit(); + }); + }); + // Listener function which will be called when user updates existing rows grid.onCellChange.subscribe(function(e, args) { // self.handler.data_store.updated will holds all the updated data