From 8575e65d4b8d75fabc7e43a201d80cd1a9bcf841 Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 29 Sep 2021 10:18:47 +0800 Subject: [PATCH] =?UTF-8?q?BI-94929=20fix:=20=E4=BF=AE=E5=A4=8Dbi-border-h?= =?UTF-8?q?over=E8=AE=A1=E7=AE=97=E5=A4=B1=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 8fdd126e2..74b4d82f8 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -287,11 +287,11 @@ if (isHide === false) { return; } - this._hideView(); + this._hideView(e); return true; }, - _hideView: function () { + _hideView: function (e) { this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); if (this.options.destroyWhenHide === true) { this.popupView && this.popupView.destroy(); @@ -300,6 +300,11 @@ } else { this.popupView && this.popupView.invisible(); } + + if (!e || !this.combo.element.__isMouseInBounds__(e)) { + this.element.removeClass(this.options.hoverClass); + } + this.element.removeClass(this.options.comboClass); delete needHideWhenAnotherComboOpen[this.getName()]; @@ -526,8 +531,8 @@ } }, - hideView: function () { - this._hideView(); + hideView: function (e) { + this._hideView(e); }, getView: function () {