Fix offsets not calculated correctly sometimes on select2 dropdowns closes #29163
This commit is contained in:
parent
f1cb81d5db
commit
a1cda953dc
|
@ -4398,7 +4398,6 @@ S2.define('select2/dropdown/attachBody',[
|
|||
|
||||
var parentOffset = $offsetParent.offset();
|
||||
|
||||
css.top -= parentOffset.top;
|
||||
css.left -= parentOffset.left;
|
||||
|
||||
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
||||
|
@ -4413,7 +4412,7 @@ S2.define('select2/dropdown/attachBody',[
|
|||
|
||||
if (newDirection == 'above' ||
|
||||
(isCurrentlyAbove && newDirection !== 'below')) {
|
||||
css.top = container.top - parentOffset.top - dropdown.height;
|
||||
css.top = container.top - dropdown.height;
|
||||
}
|
||||
|
||||
if (newDirection != null) {
|
||||
|
|
Loading…
Reference in New Issue