From c34c1cb07c2ea73a9064d2d17e342b5aacca25d3 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 9 May 2017 11:03:47 +0200 Subject: [PATCH] Press enter to open a folder --- www/drive/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/drive/main.js b/www/drive/main.js index 7ff151c1f..cad9973fd 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -383,6 +383,13 @@ define([ // Enter if (e.which === 13) { + var $allSelected = $content.find('.element.selected'); + if ($allSelected.length === 1) { + // Open the folder or the file + $allSelected.dblclick(); + return; + } + // If more than one, open only the files var $select = $content.find('.file-element.selected'); $select.each(function (idx, el) { $(el).dblclick();