Steps to Reproduce
Run fiddle
https://zkfiddle.org/sample/18oro20/8-nested-open-detail-fails-js-error
Click button
Current Result
Failed to mount: Cannot set properties of undefined (setting 'className')
Expected Result
No error
Debug Information
onStripe is invoked on detail in zk10, wasn't invoked on zk9
When invoked, "fake" node is already destroyed
Workaround
<script><![CDATA[ zk.afterLoad("zk", function () { /* THIS WORKAROUND FOR 5725 ALLOWS THE CURRENT ISSUE TO BE REPRODUCED */ /** * Purpose: https://tracker.zkoss.org/browse/ZK-5725 * Based on version: 10.0.0 * Last update: 10.0.0 */ if(zk.version != '10.0.0'){ console.warn('This override script version compatibility was tested for ZK 10.0.0. If you are running a different version, please check this script compatibility '); } var _xWidget = {}; zk.override(zk.Widget.prototype, _xWidget, { $n_: function(M) { var z = this.$n(M); if (null == z) console.warn( "Node " + (M ? "with " + M : "") + " is not found!"); return z } }); /** * Purpose: * Based on version: 10.0.0 * Last update: 10.0.0 */ if(zk.version != '10.0.0'){ console.warn('This override script version compatibility was tested for ZK 10.0.0. If you are running a different version, please check this script compatibility '); } var _xDetail = {}; zk.override(zkex.grid.Detail.prototype, _xDetail, { onStripe: function(t) { this._open && this.$n("fake") && (this.$n_("fake").className = this.parent.$n_().className + " " + this.$s("faker")) } }); }); ]]></script>
- relates to
-
ZK-5890 Javascript exception when setting Detail component visible false but open is true
-
- Open
-