react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Outline onItemClick only works once

Open Leakune opened this issue 3 years ago • 1 comments

Before you start - checklist

  • [X] I followed instructions in documentation written for my React-PDF version
  • [X] I have checked if this bug is not already reported
  • [X] I have checked if an issue is not listed in Known issues
  • [x] If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

Hello, I was using your example of Display interactive Table of Contents. The display works: it changes the page of the pdf when I click to the links. However each link only works once, when I click the same link over 2 times it doesn't change the page.

Steps to reproduce

  1. Click on one of the link from the table of contents.
  2. Click on another link.
  3. Click on the first link you clicked.
  4. The page doesn't change on step 3.

Expected behavior

  1. Click on one of the link from the table of contents -> should change the page
  2. Click on another link -> should change to another page
  3. Click on the first link you clicked -> should change back to the page like in step 1.

Actual behavior

  1. Click on one of the link from the table of contents -> change the page
  2. Click on another link -> change to another page
  3. [Issue here] Click on the first link you clicked -> the page is not changing

Additional information

No response

Environment

  • Browser (if applicable): Chrome 99
  • React-PDF version: 5.7.2
  • React version: 18.0.0

Leakune avatar May 09 '22 13:05 Leakune

I am also experiencing this exact same behavior on version 5.7.2, react version 17.0.2. Same browser.

jholmes033169 avatar May 11 '22 06:05 jholmes033169

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Aug 15 '22 00:08 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Aug 29 '22 00:08 github-actions[bot]

@wojtekmaj I also experience the same issue on version 5.7.2, react version 16.8.6. Pls suggest if this is a bug or an implementation mistake from my side? Thank you.

MuthuChess avatar Sep 23 '22 04:09 MuthuChess