Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hadasze committed Jan 22, 2025
1 parent babee2b commit b8fa995
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ class GalleryView extends React.Component {
super(props);
this.handleKeys = this.handleKeys.bind(this);
this.showMoreItems = this.showMoreItems.bind(this);
this.onKeyPress = this.onKeyPress.bind(this);
this.onKeyReleased = this.onKeyReleased.bind(this);
this.onLoadMoreButtonKeyDown = this.onLoadMoreButtonKeyDown.bind(this);
this.onLoadMoreButtonKeyReleased =
this.onLoadMoreButtonKeyReleased.bind(this);
this.createGalleryConfig = this.createGalleryConfig.bind(this);
this.screenLogs = this.screenLogs.bind(this);
this.createGallery = this.createGallery.bind(this);
Expand Down Expand Up @@ -130,7 +131,7 @@ class GalleryView extends React.Component {
}
}

onKeyPress(e) {
onLoadMoreButtonKeyDown(e) {
switch (e.keyCode || e.charCode) {
case 32: // space
case 13: // enter
Expand All @@ -143,7 +144,7 @@ class GalleryView extends React.Component {
}
}

onKeyReleased(e) {
onLoadMoreButtonKeyReleased(e) {
switch (e.keyCode || e.charCode) {
case 32: // space
case 13: // enter
Expand Down Expand Up @@ -315,8 +316,8 @@ class GalleryView extends React.Component {
onMouseDown={(e) => e.preventDefault()}
data-hook="show-more"
aria-label={buttonText}
onKeyDown={this.onKeyPress}
onKeyUp={this.onKeyReleased}
onKeyDown={this.onLoadMoreButtonKeyDown}
onKeyUp={this.onLoadMoreButtonKeyReleased}
>
{buttonText}
</button>
Expand Down

0 comments on commit b8fa995

Please sign in to comment.