mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix keyboard navigation in the drive
This commit is contained in:
parent
c2627f7eeb
commit
d25bd9ffc7
@ -737,9 +737,6 @@ define([
|
||||
var removeSelected = function (keepObj) {
|
||||
APP.selectedFiles = [];
|
||||
findSelectedElements().removeClass("cp-app-drive-element-selected");
|
||||
var $container = $driveToolbar.find('#cp-app-drive-toolbar-contextbuttons');
|
||||
if (!$container.length) { return; }
|
||||
$container.html('');
|
||||
if (!keepObj) {
|
||||
delete sel.startSelected;
|
||||
delete sel.endSelected;
|
||||
@ -1043,6 +1040,11 @@ define([
|
||||
if ([37, 38, 39, 40].indexOf(e.which) === -1) { return; }
|
||||
e.preventDefault();
|
||||
|
||||
// If the arrow keys aren't caught by another listener before, it means we can
|
||||
// use them to select content in the drive. If that's the case, we'll also
|
||||
// focus the drive container to avoid conflicts with other focused elements
|
||||
$content.focus();
|
||||
|
||||
var click = function (el) {
|
||||
if (!el) { return; }
|
||||
APP.onElementClick(ev, $(el));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user