]> source.dussan.org Git - nextcloud-server.git/commitdiff
abort rename on ESC keyup
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 18 Dec 2012 15:39:01 +0000 (16:39 +0100)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 2 Jan 2013 15:17:30 +0000 (16:17 +0100)
apps/files/js/filelist.js

index cf86cc60979088b3fe87d59618e83c31e3fe3450..1fbfc24e1e41ddeb1fd142d4096609d5deb16370 100644 (file)
@@ -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();