react-popover
react-popover copied to clipboard
v0.5.1 issue with __resizeDetector__ in Popover.componentWillUnmount
Hi @jasonkuhrt, I upgraded to v0.5.1 (manually modified the const lib = require("./build/")
of index.js to be able to compile) and the popover works, but when it is unmounted, I have this issue :
:3000/static/js/bundle.js:77744 Uncaught TypeError: Cannot read property '__resizeDetector__' of null
at Object.off (:3000/static/js/bundle.js:77744)
at Popover.untrackPopover (:3000/static/js/bundle.js:77302)
at Popover.componentWillUnmount (:3000/static/js/bundle.js:77007)
at callComponentWillUnmountWithTimerInDev (:3000/static/js/bundle.js:60069)
at HTMLUnknownElement.callCallback (:3000/static/js/bundle.js:50251)
at Object.invokeGuardedCallbackDev (:3000/static/js/bundle.js:50290)
at invokeGuardedCallback (:3000/static/js/bundle.js:50147)
at safelyCallComponentWillUnmount (:3000/static/js/bundle.js:60077)
at commitUnmount (:3000/static/js/bundle.js:60367)
at commitNestedUnmounts (:3000/static/js/bundle.js:60231)
at unmountHostComponents (:3000/static/js/bundle.js:60288)
at commitDeletion (:3000/static/js/bundle.js:60338)
at commitAllHostEffects (:3000/static/js/bundle.js:61223)
at HTMLUnknownElement.callCallback (:3000/static/js/bundle.js:50251)
at Object.invokeGuardedCallbackDev (:3000/static/js/bundle.js:50290)
at invokeGuardedCallback (:3000/static/js/bundle.js:50147)
at commitAllWork (:3000/static/js/bundle.js:61328)
at workLoop (:3000/static/js/bundle.js:61639)
at HTMLUnknownElement.callCallback (:3000/static/js/bundle.js:50251)
at Object.invokeGuardedCallbackDev (:3000/static/js/bundle.js:50290)
at invokeGuardedCallback (:3000/static/js/bundle.js:50147)
at performWork (:3000/static/js/bundle.js:61752)
at batchedUpdates (:3000/static/js/bundle.js:62196)
at performFiberBatchedUpdates (:3000/static/js/bundle.js:50598)
at stackBatchedUpdates (:3000/static/js/bundle.js:50589)
at batchedUpdates (:3000/static/js/bundle.js:50603)
at Object.batchedUpdatesWithControlledComponents [as batchedUpdates] (:3000/static/js/bundle.js:50616)
at dispatchEvent (:3000/static/js/bundle.js:50826)
@PlanetIrata Thanks for reporting! I am going to try and have a look at this. Not required but if you can find precise steps to reproduce within the demo that would probably help this issue.
I believe this was the same bug addressed in #144. @PlanetIrata can you upgrade to v0.5.2 and verify that the problem still persists?
@gabehayes Yes the v0.5.2 fix the issue, my app does not crash anymore, thank you very much ! There's still a minor issue in the console when the popover is closed:
index.js:397 Uncaught TypeError: Cannot read property 'style' of null
at index.js:397
The null
element at line index.js:397 is _this2.containerEl
below (first line of the setTimeout callback):
key: "animateExit",
value: function animateExit() {
var _this2 = this;
this.setState({ exiting: true });
this.exitingAnimationTimer2 = setTimeout(function () {
setTimeout(function () {
_this2.containerEl.style.transform = flowToPopoverTranslations[_this2.zone.flow] + "(" + _this2.zone.order * 50 + "px)";
_this2.containerEl.style.opacity = "0";
}, 0);
}, 0);