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

T263598 keyboard shortcuts on gallery #114

Merged
merged 2 commits into from May 13, 2021
Merged

T263598 keyboard shortcuts on gallery #114

merged 2 commits into from May 13, 2021

Conversation

hueitan
Copy link
Member

@hueitan hueitan commented May 11, 2021

Phabricator Ticket : https://phabricator.wikimedia.org/T263598

  • LTR / RTL cases
  • different browser

@stephanebisson
Copy link
Collaborator

Seems to work well

@hueitan hueitan changed the title T263598 Add key even prototype in gallery T263598 keyboard shortcuts on gallery May 11, 2021
@hueitan hueitan requested a review from a team May 11, 2021 19:23
@hueitan hueitan marked this pull request as ready for review May 11, 2021 19:23
Comment on lines +354 to +369
case 'ArrowRight':
case 'Right':
if ( dir === 'ltr' ) {
renderNext()
} else {
renderPrevious()
}
break
case 'ArrowLeft':
case 'Left':
if ( dir === 'ltr' ) {
renderPrevious()
} else {
renderNext()
}
break
Copy link
Member Author

Choose a reason for hiding this comment

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

This is so native, any idea to improve?

@@ -0,0 +1,16 @@
let eventListenerStack = []
Copy link
Contributor

Choose a reason for hiding this comment

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

Should all gallery event listeners be included in this new array? The ones in applyGestureEvent for example? Mainly asking because that would overlap the image zoom feature I'm working on.

@jpita jpita merged commit 9f70798 into main May 13, 2021
@jpita jpita deleted the T263598-keyboard-gallery branch May 13, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants