Skip to content

Disable arrow key navigation in the drive while modal is active - #1669

Merged
yflory merged 6 commits into
stagingfrom
ctrl+e-modal-navigation-fixes
Dec 4, 2024
Merged

Disable arrow key navigation in the drive while modal is active#1669
yflory merged 6 commits into
stagingfrom
ctrl+e-modal-navigation-fixes

Conversation

@dariiing

@dariiing dariiing commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

This PR disables the use of arrow keys inside the drive while a modal is open, fixing #1660.
Previously, arrow keys could still be used to navigate files in the background, which could lead to unintended behavior or conflicts when interacting with the modal. Now, the arrow keys are disabled inside the drive while a modal is opened.

@dariiing dariiing added Accessibility Make software available to everyone Ready to Review This PR is ready to be checked by another team member labels Oct 1, 2024
@dariiing dariiing added this to the Winter release (2024.12.0) milestone Oct 1, 2024
@dariiing dariiing self-assigned this Oct 1, 2024
Comment thread www/common/common-ui-elements.js Outdated
Comment on lines 2513 to 2518
}
else if (e.which === 13) {
if ($container.find('.cp-icons-element-selected').length === 1) {
$container.find('.cp-icons-element-selected').click();
}
return;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to avoid this type of changes that don't have any impact on the results but only on the code style. I recommend to always run a git diff before creating a commit in order to clean unnecessary changes :)

Comment thread www/common/drive-ui.js Outdated
$elements.index($selection.last()[0]);
var length = $elements.length;
if (length === 0) { return; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please remove this type of changes from the commit/PR

@yflory yflory removed the Ready to Review This PR is ready to be checked by another team member label Dec 3, 2024
@yflory
yflory merged commit 17c927d into staging Dec 4, 2024
@ghost
ghost deleted the ctrl+e-modal-navigation-fixes branch December 18, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility Make software available to everyone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants