-
Bug
-
Resolution: Fixed
-
Major
-
8.5.1.2
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.6.0 S1
Steps to Reproduce
1. run the attached zul with Edge (IE11 or IE9)
Current Result
- 1st and 6st listheader are visible
- all listcells of hidden listheaders are still visible
Expected Result
all hidden listheader and listcell are hidden.
Debug Information
1. chrome and firefox has no such bug
2. 8.5.2.FL.20180720-Eval doesn't solve this bug
3. it seems that width: 0.1px; visibility:hidden can't hide a column in IE. see table.html
Workaround
1. Use <listheader hflex=""> instead of width="%"
2. Apply the javascript
zk.afterLoad('zul.mesh', function () { if (!zk.ie && !zk.edge) return; // Patch IE/Edge var xMeshWidget = {}; zk.override(zul.mesh.MeshWidget.prototype, xMeshWidget, { domFaker_: function (out, fakeId) { //used by redraw var head = this.head; out.push('<colgroup id="', head.uuid, fakeId, '">'); for (var w = head.firstChild; w; w = w.nextSibling) { var wd = w._hflexWidth ? w._hflexWidth + 'px' : w.getWidth(), visibility = w.isVisible() ? '' : 'visibility: collapse;'; if (!w.isVisible()) wd = '0'; // B70-ZK-2036: Style width should end with 'px'. wd = wd != null ? 'width: ' + wd + ';' : ''; out.push('<col id="', w.uuid, fakeId, '" style="', wd, visibility, '"/>'); } if (fakeId.indexOf('hd') > 0 || fakeId.indexOf('ft') > 0) out.push('<col id="', head.uuid, fakeId, '-bar" style="width: 0px" />'); out.push('</colgroup>'); } }); var xHeaderWidget = {}; zk.override(zul.mesh.HeaderWidget.prototype, xHeaderWidget, { bind_: function () { this.$supers(zul.mesh.HeaderWidget, 'bind_', arguments); if (this.parent.isSizable()) this._initsz(); var mesh = this.getMeshWidget(); if (mesh) { var $n = jq(this.$n()), $faker = jq(this.$n('hdfaker')), w = this.getWidth(); if (!this.isVisible()) { $n.css('display', ''); $faker.css('display', ''); $faker.css('visibility', 'collapse'); $faker.css('width', '0'); } else { $faker.css('visibility', ''); // B70-ZK-2036: Check if header has hflex width first. if (!this._hflexWidth && w) { $faker.css('width', w); } } } this.fixFaker_(); } }); });
- blocks
-
ZK-3994 Header visibility cause missing cells after 3604
- Closed