fix arrow key bug

This commit is contained in:
daria 2024-12-03 12:14:49 +02:00
parent b4292dcd85
commit 9b253eb98a

View File

@ -990,6 +990,9 @@ define([
// Arrow keys to modify the selection
var onWindowKeydown = function (e) {
if (!$content.is(':visible')) { return; }
if ($('.cp-modal').is(':visible')) {
return;
}
var $searchBar = $tree.find('#cp-app-drive-tree-search-input');
if (document.activeElement && document.activeElement.nodeName === 'INPUT') { return; }
if ($searchBar.is(':focus') && $searchBar.val()) { return; }
@ -1061,10 +1064,6 @@ define([
var length = $elements.length;
if (length === 0) { return; }
if ($('.cp-modal').is(':visible')) {
return;
}
// List mode
if (getViewMode() === "list") {
if (e.which === 40) { click($elements.get(Math.min(lastIndex+1, length -1))); }