mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG TreeDropdownField panel positioning
See https://github.com/silverstripe/sapphire/pull/809, thanks martinduparc
This commit is contained in:
parent
4684601c38
commit
b22a7afc03
@ -54,20 +54,7 @@
|
||||
$('body').bind('click', _clickTestFn);
|
||||
|
||||
var panel = this.getPanel(), tree = this.find('.tree-holder');
|
||||
|
||||
// set the panel to the bottom of the field. Takes into account the
|
||||
// mouse scroll position.
|
||||
// @todo - support for opening above content
|
||||
var scrollTop = 0;
|
||||
|
||||
this.parents().each(function(i, e) {
|
||||
if($(e).scrollTop() > 0) {
|
||||
scrollTop = $(e).scrollTop();
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
var top = this.position().top + this.height() + scrollTop;
|
||||
var top = this.position().top + this.height();
|
||||
|
||||
panel.css('top', top);
|
||||
panel.css('width', this.width());
|
||||
|
Loading…
x
Reference in New Issue
Block a user