Can't close the Preview module (Chrome)

I have the same bug here.

I am using gatsby and prismic and the preview never closes, whenever I hit the cross icon the page reloads with the preview system.

Hi Tim,

You’re not the first person to report this, but I’m not sure what the issue is so I’m going to report this to the dev team to find out more.

Thanks.

@mgilbride @tim2 Can you tell me what browser you’re using? I think this might be a Chrome specific issue.

Yep - you’re right! I was using chrome, and don’t see the issue on firefox.

@Phil - is there any way to include the prismic toolbar as part of our projects? If so is this documented somewhere?

I see the description on the @prismicio/prismic-toolbar project on Github: “Isn’t anymore on npm. Include script static.cdn.prismic.io/prismic.min.js instead”.

This is…not ideal. I think I speak for all developers when I say that I would prefer to have control over the version of the toolbar myself, rather than have Prismic introduce breaking changes that I can’t prevent.

I think this is a breaking change from Chrome’s samesite cookies update that they have introduced, so having the toolbar in your project probably won’t solve the issue.

Also I don’t believe the team have made any changes to the toolbar recently.

Once I’ve got more information from the team I’ll update you here.

Ahh ok. That’s a fair response @Phil.

While in this case the issue isn’t due to a change by the Prismic team, I would strongly encourage providing your customers with a way to version the toolbar. Maybe via some parameter on the script to indicate which version of the toolbar is being fetched?

Just a suggestion…thanks for the quick replies as always : )

Hi Matt,

I agree I think it might be useful to allow some user controlled versioning of the toolbar, though I’m sure there was a practical reason for the change. I’ll get more information from the team as to why they made that decision and let you know.

Also and update on the issue: The team has merged a fix and we’re are just waiting to deploy, once this is done I’ll update you her.

Thanks.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)