fix infinite overlay resizing loop

This commit is contained in:
Justin Ratner
2017-10-14 19:05:54 -06:00
parent 8952cd315d
commit 0c35c26805

View File

@@ -4202,7 +4202,7 @@ class OverlayComponent {
if (contentRect.width !== this.props.measuredDimensions.width || contentRect.height !== this.props.measuredDimensions.height) {
this.resizeObserver.disconnect()
this.props.didResize()
process.nextTick(() => { this.resizeObserver.observe(this.element) })
process.nextTick(() => { this.resizeObserver.observe(this.props.element) })
}
})
this.didAttach()
@@ -4226,7 +4226,7 @@ class OverlayComponent {
}
didAttach () {
this.resizeObserver.observe(this.element)
this.resizeObserver.observe(this.props.element)
}
didDetach () {