public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
3+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
@ 2016-09-14 08:23  Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Surinder Kumar @ 2016-09-14 08:23 UTC (permalink / raw)
  To: pgadmin-hackers

Hi

*Issue:*
On debugging deeply into the code mirror JS library, I found that* Ctrl-V
event *is mapped for *"goPageDown" *which is the reason paste not working
in Mac Runtime.

I have removed this mapping temporary from Code-mirror key map object once
code mirror JS library is loaded.

In Mac Runtime, Paste event will work on *Cmd-V.*

Please find attached patch and review.


Thanks,
Surinder Kumar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] RM1478.patch (781B, 3-RM1478.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/templates/browser/js/browser.js b/web/pgadmin/browser/templates/browser/js/browser.js
index 7a202e8..f7e226e 100644
--- a/web/pgadmin/browser/templates/browser/js/browser.js
+++ b/web/pgadmin/browser/templates/browser/js/browser.js
@@ -1600,6 +1600,13 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, CodeMirror) {

   });

+  /* Remove paste event mapping from CodeMirror's emacsy KeyMap binding
+   * specific to Mac LineNumber:5797 - lib/Codemirror.js
+   * It is preventing default paste event(Cmd-V) from triggering
+   * in runtime.
+   */
+  delete CodeMirror.keyMap.emacsy["Ctrl-V"];
+
   // Use spaces instead of tab
   if ('{{ editor_use_spaces }}' == 'True') {
     pgAdmin.Browser.editor_shortcut_keys.Tab = "insertSoftTab";


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
@ 2016-09-14 10:17  Dave Page <[email protected]>
  parent: Surinder Kumar <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Dave Page @ 2016-09-14 10:17 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers

Awesome job tracking this one down!

Thanks, patch applied.

On Wed, Sep 14, 2016 at 9:23 AM, Surinder Kumar
<[email protected]> wrote:
> Hi
>
> Issue:
> On debugging deeply into the code mirror JS library, I found that Ctrl-V
> event is mapped for "goPageDown" which is the reason paste not working in
> Mac Runtime.
>
> I have removed this mapping temporary from Code-mirror key map object once
> code mirror JS library is loaded.
>
> In Mac Runtime, Paste event will work on Cmd-V.
>
> Please find attached patch and review.
>
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
@ 2016-09-14 10:19  Surinder Kumar <[email protected]>
  parent: Dave Page <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Surinder Kumar @ 2016-09-14 10:19 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

On Wed, Sep 14, 2016 at 3:47 PM, Dave Page <[email protected]> wrote:

> Awesome job tracking this one down!
>
​Thanks.​

>
> Thanks, patch applied.
>
> On Wed, Sep 14, 2016 at 9:23 AM, Surinder Kumar
> <[email protected]> wrote:
> > Hi
> >
> > Issue:
> > On debugging deeply into the code mirror JS library, I found that Ctrl-V
> > event is mapped for "goPageDown" which is the reason paste not working in
> > Mac Runtime.
> >
> > I have removed this mapping temporary from Code-mirror key map object
> once
> > code mirror JS library is loaded.
> >
> > In Mac Runtime, Paste event will work on Cmd-V.
> >
> > Please find attached patch and review.
> >
> >
> > Thanks,
> > Surinder Kumar
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list ([email protected])
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-09-14 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 08:23 [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool Surinder Kumar <[email protected]>
2016-09-14 10:17 ` Dave Page <[email protected]>
2016-09-14 10:19   ` Surinder Kumar <[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