Commit 6a7c8bb1 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил закрытие списка подстановки при клике в другую область

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55402 954022d7-b5bf-4e40-9824-e11837661b57
parent 86dec73a
......@@ -27,6 +27,8 @@
this.isFormula = false;
this.isVisible = false;
this.skipClose = false;
this.fMouseDown = null;
this.fMouseDblClick = null;
this.fMouseOver = null;
......@@ -48,6 +50,16 @@
this.fMouseDown = function (event) {t._onMouseDown(event);};
this.fMouseDblClick = function (event) {t._onMouseDblClick(event);};
this.fMouseOver = function (event) {t._onMouseOver(event);};
if (window.addEventListener) {
window.addEventListener("mousedown", function () {
if (t.skipClose) {
t.skipClose = false;
return;
}
t.hide();
}, false);
}
}
};
PopUpSelector.prototype.show = function (isFormula, arrItems, cellRect) {
......@@ -158,6 +170,7 @@
};
PopUpSelector.prototype._onMouseDown = function (event) {
this.skipClose = true;
var element = (event.target || event.srcElement);
if (this.isFormula) {
this._onChangeSelection(element);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment