diff --git a/packages/gallery/src/components/gallery/proGallery/navigationPanel.js b/packages/gallery/src/components/gallery/proGallery/navigationPanel.js index 0d323ebc4..a4acd008a 100644 --- a/packages/gallery/src/components/gallery/proGallery/navigationPanel.js +++ b/packages/gallery/src/components/gallery/proGallery/navigationPanel.js @@ -4,6 +4,8 @@ import { GalleryUI } from '../../item/media/GalleryUI'; import TextItem from '../../item/textItem.js'; +const ENTER_KEY = 'Enter'; + class NavigationPanel extends React.Component { constructor(props) { super(props); @@ -97,7 +99,7 @@ class NavigationPanel extends React.Component { onClick={() => this.scrollToThumbnail(idx)} tabIndex={0} onKeyDown={(e) => { - if (e.key === 'Enter') { + if (e.key === ENTER_KEY) { this.scrollToThumbnail(idx); } }}