From 27f84abf072e1d4138e12eece00b054ae7c687ec Mon Sep 17 00:00:00 2001 From: jian Date: Wed, 24 Apr 2024 18:08:50 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-119215=20fix:=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8clientWidth=E5=92=8CclientHeight,=E7=88=B6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=90=86=E6=8E=89=E5=AD=90=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=9A=84body=E7=9A=84clientHeight=E5=92=8CclientWidth?= =?UTF-8?q?=E5=88=B0=E7=88=B6=E5=BA=94=E7=94=A8=E7=9A=84body=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/controller/controller.popover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/core/controller/controller.popover.js b/packages/fineui/src/core/controller/controller.popover.js index 40f0edf29..d8a800780 100644 --- a/packages/fineui/src/core/controller/controller.popover.js +++ b/packages/fineui/src/core/controller/controller.popover.js @@ -58,8 +58,8 @@ export class PopoverController extends Controller { const popover = this.get(name); popover.show && popover.show(); const render = this.getRender(); - const elRect = Widget._renderEngine.createElement(render)[0].getBoundingClientRect(); - const W = elRect.width, H = elRect.height; + const el = Widget._renderEngine.createElement(render)[0]; + const W = el.clientWidth, H = el.clientHeight; const w = popover.element.width(), h = popover.element.height(); let left = (W - w) / 2, top = (H - h) / 2; if (left < 0) {