Permalink
Browse files

BUG: Treedropdowns broken inside togglecomposite fields (fixes #1945)

* Removed positioning javascript from treedropdownfield
* Set parent to be relatively positioned and overflow to visible
  • Loading branch information...
1 parent ee784c3 commit 8aa8674e78aa02e869e0fb007637b5702d89cb99 @adrexia adrexia committed May 23, 2013
Showing with 4 additions and 5 deletions.
  1. +1 −1 css/TreeDropdownField.css
  2. +1 −3 javascript/TreeDropdownField.js
  3. +2 −1 scss/TreeDropdownField.scss
View
2 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); }
View
4 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();
View
3 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;

0 comments on commit 8aa8674

Please sign in to comment.