-
Notifications
You must be signed in to change notification settings - Fork 181
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
Failed to execute 'observe' on redirect in gatsby #325
Comments
Can you provide an isolated reproduction in Codesandbox with no CSS or JS files external to fullPage.js and the minimum amount of HTML code? Use empty sections unless strictly necessary for the reproduction. |
First of all thanks for quick replyFor now I wasn't really able to reproduce the issue but in meantime I found something that could be a usefull information. I've noticed that BeforeAfterForcing site to reload with |
Thanks for that! 👍
Right? |
Yes but I'm not 100% sure if that's the actuall reason and removing those will fix the error. In quite similiar issue I've found you were suggesting to remove classes manually so I will try that approach |
Removing styles and classes on their own did not work for me, but I've noticed that on your example here class fp-scrollable does not get removed on calling destroy, It's being added. Is that the expected behaviour? 2022-05-13.11-00-56.mp4 |
Those classes should be removed, so that's for sure a bug. The problem is probably caused by trying to initialize fullPage.js before the fullPage.js structure is ready (or when it's nonexistent). You can reproduce the issue on the small fiddle I've created: I guess an easy solution for this is checking for the element we want to observe before observing it. |
Can you try replacing your dist files for the ones in the dev branch? Or if you prefer, you can replace them using npm by installing the dev branch: npm install "https://github.com/alvarotrigo/react-fullpage.git#dev" --save Let me know if this fixes your problem. |
Thanks for explaning the error! Well i've replaced files via npm but sadly it did not fix the problem. |
Try providing an isolated reproduction so I can play with the code and inspect the error. |
Is the error in the fullPage.js code btw? |
It doesnt look like you are using the dev files. |
Thansk. |
Yeah I will let you know as soon as I come home |
Updated files fixed the error! Yesterday faced some npm problems so had to try today and everything worked like a charm, thanks! |
Awesome to hear! |
Fixed in 0.1.25! 🎉 |
Description
Hi, I am a contributor in project made on gatsby-starter-default setup and I'm experiencing an issue while redirecting through the site. The idea is to have single page using fullPage and after i redirect (using gatsby-router) to another one I get an error:
Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
I believe it is caused because other pages do not have any DOM structure related to the fullPage plugin, therefore I've tried to do sort of cleanup like this:
But the problem still occurs.
Versions
@fullpage/react-fullpage: 0.1.24
The text was updated successfully, but these errors were encountered: