public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ganesh Jaybhay <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][Patch] Highlight adjacent switch cell on focus in backgrid(IE11)
Date: Wed, 24 Jul 2019 14:26:03 +0530
Message-ID: <CAK6syAoLsVODBE6M5J1EHyj_r69iuu03-CTZ6ky1+pGfo-OMxw@mail.gmail.com> (raw)

Hi Hackers,

Attached is the minor fix to highlight adjacent switch cell on focus in
IE11.

Currently nn create table columns tab, on navigating from Not Null? to
Primary key? column, switch cell for primary key doesn't get highlighted.

Kindly review.

Regards,
Ganesh Jaybhay


Attachments:

  [application/octet-stream] adjacent_switch_focus.patch (1.4K, 3-adjacent_switch_focus.patch)
  download | inline diff:
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index 8275138..3f756ae 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -690,7 +690,7 @@ define([
 
       this.$el.append(
         $('<input>', {
-          tabIndex: -1,
+          tabIndex: 0,
           type: 'checkbox',
         }).prop('checked', rawValue).prop('disabled', !editable).attr('data-toggle', 'toggle')
           .attr('data-size', options.size).attr('data-on', options.onText).attr('data-off', options.offText)
@@ -726,13 +726,17 @@ define([
             } else if (gotoCell.hasClass('editable')) {
               e.preventDefault();
               e.stopPropagation();
-              self.model.trigger('backgrid:edited', self.model,
-                self.column, command);
+              setTimeout(function() {
+                self.model.trigger('backgrid:edited', self.model,
+                  self.column, command);
+              }, 100);
               gotoCell.trigger('focus');
             } else {
               // When we have Non-Editable Cell
-              self.model.trigger('backgrid:edited', self.model,
-                self.column, command);
+              setTimeout(function() {
+                self.model.trigger('backgrid:edited', self.model,
+                  self.column, command);
+              }, 100);
             }
           }, 20);
         }


view thread (3+ 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: [pgAdmin][Patch] Highlight adjacent switch cell on focus in backgrid(IE11)
  In-Reply-To: <CAK6syAoLsVODBE6M5J1EHyj_r69iuu03-CTZ6ky1+pGfo-OMxw@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