Browse Source

Pull request #282878: BI-150695 fix: 兼容当前元素无parentNode的情况

Merge in DEC/fineui from ~ZOEY.CHEN/fineui_:final/11.0 to final/11.0

* commit '37fbf06103a34048e44dab28fc3e6bb39478a12d':
  BI-150695 fix: 兼容当前元素无parentNode的情况
master
Zoey.Chen-陈泽语 6 months ago
parent
commit
41609ada7e
  1. 2
      packages/fineui/src/core/controller/controller.layer.js

2
packages/fineui/src/core/controller/controller.layer.js

@ -108,7 +108,7 @@ export class LayerController extends Controller {
height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "",
};
const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0].parentNode);
const { top, left, scaleY, scaleX } = getPositionRelativeContainingBlockRect(layout.element[0].parentNode || layout.element[0]);
css.top = (css.top - top) / scaleY;
css.left = (css.left - left) / scaleX;

Loading…
Cancel
Save