-
Notifications
You must be signed in to change notification settings - Fork 436
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
Can't seem to navigate to highlighted portion #277
Comments
Bumb this is happening to me too, after some digging it looks like the event "pagesinit" is not triggered with |
I had the exact same issue. I think this only occurs in dev-mode cause then NextJS runs react in strict mode and then it will mount the component twice building for production and it worked for me, but obviously not ideal. The problem as I remembered it is that the react pdf highlighter code in https://github.com/agentcooper/react-pdf-highlighter/blob/14e4e7ccc2a9cd40461f53ce7925482a08a368a4/src/components/PdfHighlighter.tsx#L178C5-L178C16 creates a new eventbus which then is not passed into the "this.view" if it already exists. |
Thanks for the hint! I managed to fix it in my version by turning the eventBus in a class variable, similar to how the |
@Gr33nLight Could you show how you were able to achieve it? It still doesn't work for me. |
I had the same issue, please tell me how to work it |
Where do I append this? Do I have to fork the repo into my project just for this fix? |
You can use patch-package. |
I'm trying to use this in Next14, however, when I try to click on the highlights on the sidebar, it doesn't take me to the highlighted portion of the PDF. Anyone know why this might be?
Below is my code
The text was updated successfully, but these errors were encountered: