-
Notifications
You must be signed in to change notification settings - Fork 20
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
NS_ERROR_FAILURE when unmounting a component with <PaperContainer canvasProps={{ resize: '' }} /> #32
Comments
Thanks for creating this issue. What React version are you using? |
18.2.0. I am embedding mirador 3.3.0 (that depends on 17.0) and some plugins on my app. Let me be double sure that the problem also is reproducible using just mirado app + plugin using react 17.0 |
yeah, same happens on 17.0.2: by running mirador with the annotations plugin from here: https://github.com/ProjectMirador/mirador-annotations and then modifying AnnotationDrawing.js to add the canvas resize prop: Then you need an app that renders the whole thing and then unmount it. I used the following app.js on the root dir with:
and after the react component is gone, resize de browser window:
|
I suppose we should look into clearContainer and see if that method gets trigger on container unmount. |
Using
PaperContainer
withcanvasProps={{ resize: '' }}
, so the canvas gets properly resized when the browser window is resized leads to an exception. React installs some events listeners on the view that get invoked on such resize events after the component has been unmounted:Adding:
at PaperContainer's componentWillUnmount() prevents this to happen.
The text was updated successfully, but these errors were encountered: