diff --git a/packages/gallery/src/components/gallery/proGallery/navigationPanel.js b/packages/gallery/src/components/gallery/proGallery/navigationPanel.js index 1b0d729c2..a4acd008a 100644 --- a/packages/gallery/src/components/gallery/proGallery/navigationPanel.js +++ b/packages/gallery/src/components/gallery/proGallery/navigationPanel.js @@ -70,7 +70,7 @@ class NavigationPanel extends React.Component { style={{ ...thumbnailsStyle }} > {items.map(({ thumbnailItem, location, idx }) => { - const highlighted = idx === activeIndex % clearedGalleryItems.length; + const highlighted = idx === activeIndex % items.length; const itemStyle = { width: options[optionsMap.layoutParams.thumbnails.size], height: options[optionsMap.layoutParams.thumbnails.size], diff --git a/packages/gallery/src/components/item/itemView.js b/packages/gallery/src/components/item/itemView.js index 843ffdc04..695eb98de 100644 --- a/packages/gallery/src/components/item/itemView.js +++ b/packages/gallery/src/components/item/itemView.js @@ -127,12 +127,7 @@ class ItemView extends React.Component { onItemInfoClick(e) { const clickTarget = 'item-info'; this.onItemClick(e, clickTarget, false); - if (!this.shouldUseDirectLink()) { - // stop propagation only if we are not using direct link. - // stop propagation will prevent listening and manipulating the anchor navigations as some users do. - // we dont want to do this when we use a direct link via a tag. - e.stopPropagation(); - } + e.stopPropagation(); } onItemClick(e, clickTarget, shouldPreventDefault = true) { diff --git a/packages/lib/src/core/helpers/thumbnailsLogic.ts b/packages/lib/src/core/helpers/thumbnailsLogic.ts index 40e7f8a2e..7f57bfe9a 100644 --- a/packages/lib/src/core/helpers/thumbnailsLogic.ts +++ b/packages/lib/src/core/helpers/thumbnailsLogic.ts @@ -96,7 +96,7 @@ function getThumbnailsData({ const numberOfThumbnails = minNumOfThumbnails % 2 === 1 ? minNumOfThumbnails : minNumOfThumbnails + 1; const thumbnailsInEachSide = (numberOfThumbnails - 1) / 2; - const itemRangeStart = (activeIndexWithOffset % galleryItems.length) - thumbnailsInEachSide; + const itemRangeStart = activeIndexWithOffset - thumbnailsInEachSide; const itemRangeEnd = itemRangeStart + numberOfThumbnails; const itemToDisplay = withInfiniteScroll