fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

TypeError in Panel: clientHeight of undefined

Open Ryu36 opened this issue 9 years ago • 4 comments

Bug Report

  • Package version(s): 2.7.1
  • Browser and OS versions: Chrome 56.0.2924.87 / Windows Server 2012 R2

Describe the issue:

React Exception when using the Panel:

Exception in Panel.componentDidUpdate(): TypeError: Cannot read property 'clientHeight' of undefined at Panel._updateFooterPosition (http://localhost:8080/vendor.js:34492:30) at Panel.componentDidUpdate (http://localhost:8080/vendor.js:34408:18) at Panel.obj.(anonymous function) [as componentDidUpdate] (http://localhost:8080/vendor.js:26834:42) at measureLifeCyclePerf (http://localhost:8080/vendor.js:37907:12) at http://localhost:8080/vendor.js:38561:11 at CallbackQueue.notifyAll (http://localhost:8080/vendor.js:23489:22) at ReactReconcileTransaction.close (http://localhost:8080/vendor.js:43002:26) at ReactReconcileTransaction.closeAll (http://localhost:8080/vendor.js:17485:25) at ReactReconcileTransaction.perform (http://localhost:8080/vendor.js:17432:16) at ReactUpdatesFlushTransaction.perform (http://localhost:8080/vendor.js:17419:20)

Panel is defined like:

<Panel headerText="New Something" isLightDismiss={true} isOpen={this.state.showNewForm} onDismiss={this.closePanel.bind(this)}>... </Panel>

Ryu36 avatar Mar 28 '17 15:03 Ryu36

I experience kind of the same issue. However - for me it only occurs when defining multiple Panels on the page. However the error occurs on different moments:

  • When nesting 2 panels, the error occurs only when closing then parent panel
  • When putting 2 panels side-by-side, the error occurs both when opening and closing the panel.

nse7ens avatar Mar 29 '17 09:03 nse7ens

Good advice. Another component of my site renders a second panel, too. So I have multiple panels in one site. Assigning keys made no difference.

Ryu36 avatar Mar 29 '17 12:03 Ryu36

I was able to get it to repro in a codepen, so I'll check it out soon.

micahgodbolt avatar Mar 30 '17 20:03 micahgodbolt

Fix was merged.

dzearing avatar Apr 01 '17 22:04 dzearing