Skip to content

Commit 36f0e8e

Browse files
author
minjk-bl
committed
Add esc shortcut to FileNavigation
1 parent d8cfbf2 commit 36f0e8e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

visualpython/html/component/fileNavigation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-->
1111
<!-- use body tag to strip comments out on requirejs/text plugin -->
1212
<body>
13-
<div id="vp_fileNavigation">
13+
<div id="vp_fileNavigation" class="vp-filenavigation-base">
1414
<div class='fileNavigationPage-container center-1rem-gray' >
1515
<div class="fileNavigationPage-sidebar">
1616
<!-- Jupyter Notebook -->

visualpython/js/com/com_Event.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,13 @@ define([], function() {
207207
that.keyManager.keyCheck.shiftKey = false;
208208
}
209209
if (evt.keyCode == that.keyManager.keyCode.escKey) {
210+
// check if there is visible file navigation : FileNavigation
211+
if ($('.vp-filenavigation-base:visible').length > 0) {
212+
// close file navigation
213+
$('.vp-filenavigation-base:visible').remove();
214+
}
210215
// check if there is visible data selector : DataSelector
211-
if ($('.vp-dataselector-base:visible').length > 0) {
216+
else if ($('.vp-dataselector-base:visible').length > 0) {
212217
// close data selector
213218
$('.vp-dataselector-base:visible').remove();
214219
}

0 commit comments

Comments
 (0)