diff --git a/css/TreeDropdownField.css b/css/TreeDropdownField.css index a402e2259..bda6fbbd9 100644 --- a/css/TreeDropdownField.css +++ b/css/TreeDropdownField.css @@ -1,4 +1,4 @@ -div.TreeDropdownField { width: 400px; background: #fff; border: 1px solid #aaa; cursor: pointer; overflow: hidden; } +div.TreeDropdownField { width: 400px; background: #fff; border: 1px solid #aaa; cursor: pointer; overflow: visible; position: relative; } div.TreeDropdownField input { border: none; background: none; padding: 0; margin: 0; } div.TreeDropdownField .treedropdownfield-title { float: left; padding: 7px; width: 90%; line-height: 16px; overflow: hidden; outline: none; } div.TreeDropdownField .treedropdownfield-panel { clear: left; position: absolute; overflow: auto; display: none; cursor: default; border: 1px solid #aaa; border-top: none; margin: 1px 0 0 -1px; /* account for border on container div */ max-height: 200px; background-color: #fff; z-index: 50; -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); -o-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); } diff --git a/javascript/TreeDropdownField.js b/javascript/TreeDropdownField.js index 055faca9b..f9d713118 100644 --- a/javascript/TreeDropdownField.js +++ b/javascript/TreeDropdownField.js @@ -58,9 +58,7 @@ $('body').bind('click', _clickTestFn); var panel = this.getPanel(), tree = this.find('.tree-holder'); - var top = this.position().top + this.height(); - - panel.css('top', top); + panel.css('width', this.width()); panel.show(); diff --git a/scss/TreeDropdownField.scss b/scss/TreeDropdownField.scss index 7d3b11e0b..05605f61f 100755 --- a/scss/TreeDropdownField.scss +++ b/scss/TreeDropdownField.scss @@ -3,7 +3,8 @@ div.TreeDropdownField { background: #fff; border: 1px solid #aaa; cursor: pointer; - overflow: hidden; + overflow: visible; + position:relative; input { border: none;