From f34646d652310442cb5339aabbbb269f10dfa838 Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Tue, 15 Aug 2017 15:44:59 -0700 Subject: [PATCH] HDFS-12301. NN File Browser UI: Navigate to a path when enter is pressed --- .../hadoop-hdfs/src/main/webapps/hdfs/explorer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js index 3e276a9a9f6..dae35196cfa 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js @@ -370,6 +370,12 @@ var b = function() { browse_directory($('#directory').val()); }; $('#btn-nav-directory').click(b); + //Also navigate to the directory when a user presses enter. + $('#directory').on('keyup', function (e) { + if (e.which == 13) { + browse_directory($('#directory').val()); + } + }); var dir = window.location.hash.slice(1); if(dir == "") { window.location.hash = "/";