From 017319edcc3d63b8a1becd0c6b83fdcedb7e010a Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 29 Dec 2020 15:11:34 +0800 Subject: [PATCH] =?UTF-8?q?BI-76510=20&&=20BI-76647=20=20IEpopup=E9=97=AA?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=20&&=20combo=E5=86=85=E9=83=A8resize?= =?UTF-8?q?=E4=B8=8D=E6=94=B6=E8=B5=B7popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 8 +++++--- src/base/layer/layer.popover.js | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index c62334058..e694ee8e3 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -85,9 +85,10 @@ ] })))); o.isDefaultInit && (this._assertPopupView()); - BI.Resizers.add(this.getName(), BI.bind(function () { + BI.Resizers.add(this.getName(), BI.bind(function (e) { + // 如果resize对象是combo的子元素,则不应该收起,或交由hideChecker去处理 if (this.isViewVisible()) { - this._hideView(); + BI.isNotNull(e) ? this._hideIf(e) : this._hideView(); } }, this)); }, @@ -351,7 +352,8 @@ var self = this; this._assertPopupViewRender(); this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW); - + // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 + this.popupView.css({left: -999999999, top: -99999999}); this.popupView.visible(); BI.each(needHideWhenAnotherComboOpen, function (i, combo) { if (i !== self.getName()) { diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js index 4c6bfe0e6..a0cf234dd 100644 --- a/src/base/layer/layer.popover.js +++ b/src/base/layer/layer.popover.js @@ -45,7 +45,9 @@ BI.Popover = BI.inherit(BI.Widget, { top: BI.clamp(self.startY, 0, H - self.element.height()) + "px", }); // BI-12134 没有什么特别好的方法 - BI.Resizers._resize(); + BI.Resizers._resize({ + target: self.element[0], + }); }, function () { self.tracker.releaseMouseMoves(); }, _global);