public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][RM4269] Navigating Switch cell using Tab key throws console error
Date: Thu, 16 May 2019 17:21:42 +0530
Message-ID: <CAKKotZRR_wLS5EJBTwYu=Ju1DFdd0uHSr__7fP3E1HJ7UVjNBw@mail.gmail.com> (raw)

Hi,

PFA patch to fix the issue where navigating Switch cell using Tab key
throws console error.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Attachments:

  [application/octet-stream] RM_4269.diff (1.2K, 3-RM_4269.diff)
  download | inline diff:
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index b717230c..804dc92d 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -545,20 +545,24 @@ define([
         }
 
         if (gotoCell) {
+          let command = new Backgrid.Command({
+            key: 'Tab',
+            keyCode: 9,
+            which: 9,
+            shiftKey: e.shiftKey,
+          });
           setTimeout(function() {
+            // When we have Editable Cell
             if (gotoCell.hasClass('editable')) {
               e.preventDefault();
               e.stopPropagation();
-              var command = new Backgrid.Command({
-                key: 'Tab',
-                keyCode: 9,
-                which: 9,
-                shiftKey: e.shiftKey,
-              });
               self.model.trigger('backgrid:edited', self.model,
                 self.column, command);
-              this.exitEditMode();
               gotoCell.trigger('focus');
+            } else {
+              // When we have Non-Editable Cell
+              self.model.trigger('backgrid:edited', self.model,
+                self.column, command);
             }
           }, 20);
         }


view thread (2+ 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: [pgAdmin4][RM4269] Navigating Switch cell using Tab key throws console error
  In-Reply-To: <CAKKotZRR_wLS5EJBTwYu=Ju1DFdd0uHSr__7fP3E1HJ7UVjNBw@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