-
Bug
-
Resolution: Duplicate
-
Normal
-
8.0.3
-
None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
run fiddle http://zkfiddle.org/sample/2e4e6jt/3-Combobox-white-space-bug
open combobox
Actual Result
Popup contains white space
Expected Result
popup should fit to content
Debug Info
during combowidget._fixsz():
var pp2 = this.getPopupNode_(true); if (ppofs[1] == 'auto' && pp.offsetHeight > 350) { // offsetHeight is currently larger than 350 because each item's height is currently 24 px, should be 14px pp.style.height = '350px'; } else if (pp.offsetHeight < 10) { pp.style.height = '10px'; if (this._shadow) this._shadow.sync(); }
Root Cause
content of grid rows have a line-height of 24px
https://github.com/zkoss/zk/blob/634025ec0c5cf6d63cadc31351140cdb5edec9e1/zul/src/archive/web/zul/less/_zkvariables.less#L13
https://github.com/zkoss/zk/blob/8d4561145acd5f950a3adaac900c7b26ce461b37/zul/src/archive/web/js/zul/grid/less/grid.less#L219
Workaround
<style> .z-column-content .z-comboitem, .z-row-content .z-comboitem, .z-group-content .z-comboitem, .z-groupfoot-content .z-comboitem, .z-footer-content .z-comboitem { line-height: initial; } </style>
- duplicates
-
ZK-3664 A combobox popup in a Grid/Listbox produces extra height
- Closed