Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): fix arrow key navigation letting you go past the last and first image in the asset viewer #16679

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Snowknight26
Copy link
Contributor

Description

If you view a set of assets, you can keep pressing the left arrow key on the first image even if it doesn't change the image (since you're on the first image). Then, to go to the next image, you need to press the right arrow key as many times as you pressed left. Same principle applies with the last image.

Now you can't "go past" the bounds of the first/last image as far as keyboard navigation is concerned.

How Has This Been Tested?

  • Pressed the left/right arrow keys in various context: photos page, slideshow, search page, etc.

Screenshots (if appropriate)

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants