mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
Merge pull request #1669 from cryptpad/ctrl+e-modal-navigation-fixes
Disable arrow key navigation in the drive while modal is active
This commit is contained in:
commit
17c927d3d8
@ -2525,6 +2525,7 @@ define([
|
||||
window.setTimeout(function () {
|
||||
modal.show();
|
||||
$modal.focus();
|
||||
next();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user