Disable arrow key navigation in the drive while modal is active - #1669
Merged
Conversation
Chouhartem
approved these changes
Dec 3, 2024
yflory
requested changes
Dec 3, 2024
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; | ||
| } |
Contributor
There was a problem hiding this comment.
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 :)
| $elements.index($selection.last()[0]); | ||
| var length = $elements.length; | ||
| if (length === 0) { return; } | ||
|
|
Contributor
There was a problem hiding this comment.
Same here, please remove this type of changes from the commit/PR
yflory
approved these changes
Dec 4, 2024
ghost
deleted the
ctrl+e-modal-navigation-fixes
branch
December 18, 2024 10:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.