mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix arrow key bug
This commit is contained in:
parent
b4292dcd85
commit
9b253eb98a
@ -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))); }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user