public inbox for [email protected]help / color / mirror / Atom feed
Fix in switch cell tab navigation 4+ messages / 3 participants [nested] [flat]
* Fix in switch cell tab navigation @ 2020-03-25 09:51 Ganesh Jaybhay <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Ganesh Jaybhay @ 2020-03-25 09:51 UTC (permalink / raw) To: pgadmin-hackers Hi Hackers, Attached is the patch for below minor fix in the switch cell tab navigation: After pressing the tab key on switch cell, sometimes focus doesn't go to the immediate next editable cell. It goes to the different cell for fraction of seconds and again comes to the next editable cell. Please review. Regards, Ganesh Jaybhay Attachments: [application/x-patch] switch_cell_navigation.patch (1.8K, 3-switch_cell_navigation.patch) download | inline diff: diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js index 230d7ce56..61127ddb1 100644 --- a/web/pgadmin/static/js/backgrid.pgadmin.js +++ b/web/pgadmin/static/js/backgrid.pgadmin.js @@ -206,7 +206,7 @@ define([ renderable = Backgrid.callByNeed(cell.column.renderable(), cell.column, cell.model); editable = Backgrid.callByNeed(cell.column.editable(), cell.column, model); if(cell && cell.$el.hasClass('edit-cell') && - !cell.$el.hasClass('privileges') || cell.$el.hasClass('delete-cell')) { + !cell.$el.hasClass('privileges') || cell.$el.hasClass('delete-cell') || cell.$el.hasClass('subgrid-cell')) { model.trigger('backgrid:next', m, n, false); if(cell.$el.hasClass('delete-cell')) { setTimeout(function(){ @@ -717,7 +717,11 @@ define([ gotoCell = e.shiftKey ? self.$el.prev() : self.$el.next(); } - if (gotoCell) { + if (gotoCell && gotoCell.length > 0) { + if(gotoCell.hasClass('editable')){ + e.preventDefault(); + e.stopPropagation(); + } let command = new Backgrid.Command({ key: 'Tab', keyCode: 9, @@ -727,12 +731,8 @@ define([ setTimeout(function() { // When we have Editable Cell if (gotoCell.hasClass('editable') && gotoCell.hasClass('edit-cell')) { - e.preventDefault(); - e.stopPropagation(); gotoCell.trigger('focus'); } else if (gotoCell.hasClass('editable')) { - e.preventDefault(); - e.stopPropagation(); setTimeout(function() { self.model.trigger('backgrid:edited', self.model, self.column, command); ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Fix in switch cell tab navigation @ 2020-03-25 12:09 Khushboo Vashi <[email protected]> parent: Ganesh Jaybhay <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Khushboo Vashi @ 2020-03-25 12:09 UTC (permalink / raw) To: Ganesh Jaybhay <[email protected]>; +Cc: pgadmin-hackers Hi Ganesh, You have put a check on *subgrid-cell* class, which does not exist in the entire source code. Also, can you please let me know of any module which you have tested, so I can test accordingly though the code for the same looks good to me. Thanks, Khushboo On Wed, Mar 25, 2020 at 3:21 PM Ganesh Jaybhay < [email protected]> wrote: > Hi Hackers, > > Attached is the patch for below minor fix in the switch cell tab > navigation: > > After pressing the tab key on switch cell, sometimes focus doesn't go to > the immediate next editable cell. It goes to the different cell for > fraction of seconds and again comes to the next editable cell. > > Please review. > > Regards, > Ganesh Jaybhay > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Fix in switch cell tab navigation @ 2020-03-26 05:00 Ganesh Jaybhay <[email protected]> parent: Khushboo Vashi <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Ganesh Jaybhay @ 2020-03-26 05:00 UTC (permalink / raw) To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers Hi Khushboo, I have removed the condition added for subgrid-cell. Please find the attached updated patch Regards, Ganesh Jaybhay On Wed, Mar 25, 2020 at 5:39 PM Khushboo Vashi < [email protected]> wrote: > Hi Ganesh, > > You have put a check on *subgrid-cell* class, which does not exist in the > entire source code. > Also, can you please let me know of any module which you have tested, so I > can test accordingly though the code for the same looks good to me. > > Thanks, > Khushboo > > > On Wed, Mar 25, 2020 at 3:21 PM Ganesh Jaybhay < > [email protected]> wrote: > >> Hi Hackers, >> >> Attached is the patch for below minor fix in the switch cell tab >> navigation: >> >> After pressing the tab key on switch cell, sometimes focus doesn't go to >> the immediate next editable cell. It goes to the different cell for >> fraction of seconds and again comes to the next editable cell. >> >> Please review. >> >> Regards, >> Ganesh Jaybhay >> > Attachments: [application/octet-stream] switch_cell_navigation_v1.patch (1.2K, 3-switch_cell_navigation_v1.patch) download | inline diff: diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js index 230d7ce56..b05e1422f 100644 --- a/web/pgadmin/static/js/backgrid.pgadmin.js +++ b/web/pgadmin/static/js/backgrid.pgadmin.js @@ -717,7 +717,11 @@ define([ gotoCell = e.shiftKey ? self.$el.prev() : self.$el.next(); } - if (gotoCell) { + if (gotoCell && gotoCell.length > 0) { + if(gotoCell.hasClass('editable')){ + e.preventDefault(); + e.stopPropagation(); + } let command = new Backgrid.Command({ key: 'Tab', keyCode: 9, @@ -727,12 +731,8 @@ define([ setTimeout(function() { // When we have Editable Cell if (gotoCell.hasClass('editable') && gotoCell.hasClass('edit-cell')) { - e.preventDefault(); - e.stopPropagation(); gotoCell.trigger('focus'); } else if (gotoCell.hasClass('editable')) { - e.preventDefault(); - e.stopPropagation(); setTimeout(function() { self.model.trigger('backgrid:edited', self.model, self.column, command); ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Fix in switch cell tab navigation @ 2020-03-26 05:20 Akshay Joshi <[email protected]> parent: Ganesh Jaybhay <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Akshay Joshi @ 2020-03-26 05:20 UTC (permalink / raw) To: Ganesh Jaybhay <[email protected]>; +Cc: Khushboo Vashi <[email protected]>; pgadmin-hackers Thanks, patch applied. On Thu, Mar 26, 2020 at 10:30 AM Ganesh Jaybhay < [email protected]> wrote: > Hi Khushboo, > > I have removed the condition added for subgrid-cell. Please find the > attached updated patch > > Regards, > Ganesh Jaybhay > > On Wed, Mar 25, 2020 at 5:39 PM Khushboo Vashi < > [email protected]> wrote: > >> Hi Ganesh, >> >> You have put a check on *subgrid-cell* class, which does not exist in >> the entire source code. >> Also, can you please let me know of any module which you have tested, so >> I can test accordingly though the code for the same looks good to me. >> >> Thanks, >> Khushboo >> >> >> On Wed, Mar 25, 2020 at 3:21 PM Ganesh Jaybhay < >> [email protected]> wrote: >> >>> Hi Hackers, >>> >>> Attached is the patch for below minor fix in the switch cell tab >>> navigation: >>> >>> After pressing the tab key on switch cell, sometimes focus doesn't go to >>> the immediate next editable cell. It goes to the different cell for >>> fraction of seconds and again comes to the next editable cell. >>> >>> Please review. >>> >>> Regards, >>> Ganesh Jaybhay >>> >> -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-03-26 05:20 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-03-25 09:51 Fix in switch cell tab navigation Ganesh Jaybhay <[email protected]> 2020-03-25 12:09 ` Khushboo Vashi <[email protected]> 2020-03-26 05:00 ` Ganesh Jaybhay <[email protected]> 2020-03-26 05:20 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox