public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
Date: Wed, 14 Sep 2016 13:53:13 +0530
Message-ID: <CAM5-9D_S+gSmsXGsTWqTFk5J19RPJ7K64tSSJTMn_tpcNr1aMw@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-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";
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: [pgAdmin4][Patch]: RM1478 - Paste event is not working in Query tool
In-Reply-To: <CAM5-9D_S+gSmsXGsTWqTFk5J19RPJ7K64tSSJTMn_tpcNr1aMw@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