mirror of https://github.com/BTCPrivate/copay.git
fix copy/paste bug on osx/linux/win
This commit is contained in:
parent
051eb948a0
commit
43e5279570
13
js/shell.js
13
js/shell.js
|
@ -38,20 +38,10 @@
|
|||
var ipc = require('ipc');
|
||||
var clipb = require('clipboard');
|
||||
|
||||
// atom shell forces to implement the clipboard on our own - thanks obama.
|
||||
// atom shell forces to implement the clipboard (on osx) on our own - thanks obama.
|
||||
|
||||
Mousetrap.stopCallback = function() { return false };
|
||||
|
||||
Mousetrap.bind('ctrl+c', function(e) {
|
||||
clipb.writeText(window.getSelection().toString());
|
||||
});
|
||||
|
||||
Mousetrap.bind('ctrl+v', function(e) {
|
||||
if (document.activeElement) {
|
||||
document.activeElement.value = clipb.readText();
|
||||
}
|
||||
});
|
||||
|
||||
Mousetrap.bind('command+c', function(e) {
|
||||
clipb.writeText(window.getSelection().toString());
|
||||
});
|
||||
|
@ -59,6 +49,7 @@
|
|||
Mousetrap.bind('command+v', function(e) {
|
||||
if (document.activeElement) {
|
||||
document.activeElement.value = clipb.readText();
|
||||
document.activeElement.dispatchEvent(new Event('change'));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue