Fix CMD+V (Paste) in the Mac runtime. Finally fixes #1478

This commit is contained in:
Surinder Kumar 2016-09-14 11:17:34 +01:00 committed by Dave Page
parent 4ba8f4830b
commit 3035ae13df

View File

@ -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";