diff --git a/src/base/combination/bubble.js b/src/base/combination/bubble.js index 5177f3020..47c067e20 100644 --- a/src/base/combination/bubble.js +++ b/src/base/combination/bubble.js @@ -321,7 +321,7 @@ this._assertPopupViewRender(); this.fireEvent(BI.Bubble.EVENT_BEFORE_POPUPVIEW); // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 - this.popupView.css({left: -999999999, top: -99999999}); + // this.popupView.css({left: -999999999, top: -99999999}); this.popupView.visible(); this.adjustWidth(e); diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 52e9df59a..2019dd756 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -106,6 +106,28 @@ }); }, + _assertPopupView: function () { + var self = this, o = this.options; + if (this.popupView == null) { + this.popupView = BI.createWidget(this.options.popup, { + type: "bi.popup_view", + showArrow: o.showArrow, + value: o.value + }, this); + this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { + if (type === BI.Events.CLICK) { + self.combo.setValue(self.getValue()); + self.fireEvent(BI.Bubble.EVENT_CHANGE, value, obj); + } + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + }); + this.popupView.setVisible(false); + BI.nextTick(function () { + self.fireEvent(BI.Bubble.EVENT_AFTER_INIT); + }); + } + }, + _hideView: function (e) { var o = this.options; this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);