#861 closed defect (fixed)
[patch] fix appearance of combobox option list
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Combobox | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
This small patch aligns the right edge of the combobox dropdown with the rest of the widget and improves it appearance:
In {{src/widget/html/ComboBox.js}} change:
showResultList: function(){ // Our dear friend IE doesnt take max-height so we need to calculate that on our own every time var childs = this.optionsListNode.childNodes; if(childs.length){ var visibleCount = this.maxListLength; if(childs.length < visibleCount){ visibleCount = childs.length; } with(this.optionsListNode.style){ display = ""; height = ((visibleCount) ? (dojo.style.getOuterHeight(childs[0]) * visibleCount) : 0)+"px"; width = dojo.html.getOuterWidth(this.cbTableNode)+"px"; } // only fadein once (flicker) if(!this._result_list_open){ dojo.html.setOpacity(this.optionsListNode, 0); dojo.lfx.fadeIn(this.optionsListNode, 200).play(); } // prevent IE bleed through this._iframeTimer = dojo.lang.setTimeout(this, "sizeBackgroundIframe", 200); this._result_list_open = true; }else{ this.hideResultList(); } },
to subtract 2 pixels from the width of the optionsListNode:
showResultList: function(){ // Our dear friend IE doesnt take max-height so we need to calculate that on our own every time var childs = this.optionsListNode.childNodes; if(childs.length){ var visibleCount = this.maxListLength; if(childs.length < visibleCount){ visibleCount = childs.length; } with(this.optionsListNode.style){ display = ""; height = ((visibleCount) ? (dojo.style.getOuterHeight(childs[0]) * visibleCount) : 0)+"px"; width = dojo.html.getOuterWidth(this.cbTableNode)-2+"px"; } // only fadein once (flicker) if(!this._result_list_open){ dojo.html.setOpacity(this.optionsListNode, 0); dojo.lfx.fadeIn(this.optionsListNode, 200).play(); } // prevent IE bleed through this._iframeTimer = dojo.lang.setTimeout(this, "sizeBackgroundIframe", 200); this._result_list_open = true; }else{ this.hideResultList(); } },
Note: See
TracTickets for help on using
tickets.
Fixed in [4230]