diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-03-08 18:59:54 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-03-08 18:59:54 +0100 |
commit | 2dd698fd79abc35f4f56fbf929d3fb0320c27bfe (patch) | |
tree | adbd4fe9c9b1a3979596b65da7382baca24591ae /tpl/default/js | |
parent | db0caba3c40c8d073779e77b2bada8cdba6d0518 (diff) | |
download | Shaarli-2dd698fd79abc35f4f56fbf929d3fb0320c27bfe.tar.gz Shaarli-2dd698fd79abc35f4f56fbf929d3fb0320c27bfe.tar.zst Shaarli-2dd698fd79abc35f4f56fbf929d3fb0320c27bfe.zip |
Submit editlink textarea using CTRL+Enter shortcut
Diffstat (limited to 'tpl/default/js')
-rw-r--r-- | tpl/default/js/shaarli.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index d47c257f..f7de0a49 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -256,7 +256,14 @@ window.onload = function () { | |||
256 | 256 | ||
257 | resize(); | 257 | resize(); |
258 | } | 258 | } |
259 | |||
259 | if (description != null) { | 260 | if (description != null) { |
260 | init(); | 261 | init(); |
262 | // Submit editlink form with CTRL + Enter in the text area. | ||
263 | description.addEventListener('keydown', function (event) { | ||
264 | if (event.ctrlKey && event.keyCode === 13) { | ||
265 | document.getElementById('button-save-edit').click(); | ||
266 | } | ||
267 | }); | ||
261 | } | 268 | } |
262 | }; | 269 | }; |