From 6f6760bf7340f252e975c566b6e775339d22904e Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 29 May 2023 10:31:23 +0800 Subject: [PATCH] =?UTF-8?q?BI-127107=20fix:=20=E3=80=90=E6=9D=A5=E6=BA=90P?= =?UTF-8?q?T=E9=A1=B9=E7=9B=AE=E3=80=91bi6.0.7=EF=BC=8Cie11=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/utils/dom.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/fineui/src/core/utils/dom.js b/packages/fineui/src/core/utils/dom.js index 52af3c798..552a60d44 100644 --- a/packages/fineui/src/core/utils/dom.js +++ b/packages/fineui/src/core/utils/dom.js @@ -1,9 +1,10 @@ /** * 对DOM操作的通用函数 */ -import { Widget } from "../4.widget" +import { Widget } from "../4.widget"; import { each, isEmpty, isNull, isNotNull } from "../2.base"; import $ from "jquery"; +import { isIE } from "./../platform"; export function ready(fn) { Widget._renderEngine.createElement(document).ready(fn); @@ -65,10 +66,10 @@ export function preloadImages(srcArray, onload) { each(srcArray, (i, src) => { images[i] = new Image(); images[i].src = src; - images[i].onload = function () { + images[i].onload = function() { complete(); }; - images[i].onerror = function () { + images[i].onerror = function() { complete(); }; }); @@ -104,7 +105,7 @@ export function getTextSizeHeight(text, fontSize = 12) { let _scrollWidth = null; export function getScrollWidth(css) { - if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) { + if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) { const ul = Widget._renderEngine.createElement("
").width(50).height(50) .css({ position: "absolute", @@ -751,7 +752,7 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap * 获取position:fixed相对定位的元素 */ export function getPositionRelativeContainingBlock(element) { - if (["html", "body", "#document"].indexOf((element.nodeName || "").toLowerCase()) >= 0) { + if (isIE() || ["html", "body", "#document"].indexOf((element.nodeName || "").toLowerCase()) >= 0) { // $FlowFixMe[incompatible-return]: assume body is always available return element.ownerDocument.body; }