From: Jörn Friedrich Dreyer Date: Tue, 18 Dec 2012 15:39:01 +0000 (+0100) Subject: abort rename on ESC keyup X-Git-Tag: v5.0.0alpha1~150^2~22^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a6733ff012b2d6c41c6d551ad1353856f9dfa14b;p=nextcloud-server.git abort rename on ESC keyup --- diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index cf86cc60979..1fbfc24e1e4 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -189,6 +189,13 @@ var FileList={ td.children('a.name').show(); return false; }); + input.keyup(function(event){ + if (event.keyCode == 27) { + tr.data('renaming',false); + form.remove(); + td.children('a.name').show(); + } + }); input.click(function(event){ event.stopPropagation(); event.preventDefault();