-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Using PaperContainer with canvasProps={{ 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:
Uncaught NS_ERROR_FAILURE:
_setElementSize paper-core.js:13597
setViewSize paper-core.js:13053
resize paper-core.js:12856
add paper-core.js:12749
View paper-core.js:12854
CanvasView paper-core.js:13575
create paper-core.js:13212
Project paper-core.js:2892
setup paper-core.js:855
componentDidMount Paper.container.js:41
React 12
SizeAwareComponent with-size.js:220
SizeAwareComponent with-size.js:289
exec throttle.js:67
wrapper throttle.js:93
addListener element-resize-detector.js:163
onElementDetectable element-resize-detector.js:238
ready scroll.js:611
process batch-processor.js:124
processBatch batch-processor.js:37
setTimeout handler*raf batch-processor.js:82
requestFrame batch-processor.js:83
processBatchAsync batch-processor.js:64
addFunction batch-processor.js:24
install scroll.js:619
makeDetectable scroll.js:640
attachListenerToElement element-resize-detector.js:231
forEach collection-utils.js:14
listenTo element-resize-detector.js:199
handleDOMNode with-size.js:238
componentDidMount with-size.js:174
React 19
Adding:
if (paper.view) {
paper.view.remove();
}
at PaperContainer's componentWillUnmount() prevents this to happen.
Metadata
Metadata
Assignees
Labels
No labels