diff options
author | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-18 00:37:26 +0800 |
---|---|---|
committer | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-18 00:37:26 +0800 |
commit | 0e2f6691bfbbcc666c409be6b8657bd6ca475ddd (patch) | |
tree | 548bc65610555fa06cfb4b23f6cf2b2d93088469 /cmd/mist/assets/ext | |
parent | abb9b7f46ff3b2ef0bb4f2e95f029591688768c4 (diff) | |
download | dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.gz dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.bz2 dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.lz dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.xz dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.tar.zst dexon-0e2f6691bfbbcc666c409be6b8657bd6ca475ddd.zip |
Cut, Copy, Undo and Redo working in webview
Diffstat (limited to 'cmd/mist/assets/ext')
-rw-r--r-- | cmd/mist/assets/ext/mist.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/mist/assets/ext/mist.js b/cmd/mist/assets/ext/mist.js index 8734f8dc7..8589c8fc5 100644 --- a/cmd/mist/assets/ext/mist.js +++ b/cmd/mist/assets/ext/mist.js @@ -27,9 +27,14 @@ document.onkeydown = function(evt) { } else if (evt.ctrlKey && evt.keyCode == 88) { window.document.execCommand("cut"); console.log("Ctrl-X"); - } if (evt.ctrlKey && evt.keyCode == 86) { + } else if (evt.ctrlKey && evt.keyCode == 86) { + window.document.execCommand("paste"); console.log("Ctrl-V"); - } if (evt.ctrlKey && evt.keyCode == 90) { + } else if (evt.ctrlKey && evt.keyCode == 90) { + window.document.execCommand("undo"); + console.log("Ctrl-Z"); + } else if (evt.ctrlKey && evt.shiftKey && evt.keyCode == 90) { + window.document.execCommand("redo"); console.log("Ctrl-Z"); } };
\ No newline at end of file |