microsoft/immersive-reader-sdk

Overlay doesnt close on route change

didair opened this issue · 2 comments

Hi,

we use Immersive Reader on a few places in our project with React and React router. Theres a confusing behaviour of the Immersive Reader overlay. If the user goes back a page etc with the browser controls the Immersive Reader overlay is still showing. Can I fix this? Is this expected behaviour on your end?

You may be able to fix this by calling the close() function on any route change where the current route isn't the one that the Immersive Reader should be open.

Yes that worked! I couldnt find the reference anywhere, so Im going to create a PR to add it in the readme.