Commit afe4fe14 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

addEventListener input on focus

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53387 954022d7-b5bf-4e40-9824-e11837661b57
parent 1ee20500
...@@ -212,19 +212,12 @@ ...@@ -212,19 +212,12 @@
.on("input." + namespace, function () {return t._onInputTextArea.apply(t, arguments);}); .on("input." + namespace, function () {return t._onInputTextArea.apply(t, arguments);});
// check input, it may have zero len, for mobile version // check input, it may have zero len, for mobile version
if (t.input) { if (t.input && t.input.addEventListener) {
// Не поддерживаем drop на верхнюю строку // Не поддерживаем drop на верхнюю строку
if (document.addEventListener) { t.input.addEventListener("drop", function (e) {
t.input.addEventListener("drop", function (e) { e.preventDefault();
e.preventDefault(); return false;
return false; }, false);
}, false);
} else {
t.input.attachEvent("ondrop", function (e) {
e.preventDefault();
return false;
});
}
} }
}, },
......
...@@ -348,18 +348,19 @@ ...@@ -348,18 +348,19 @@
}); });
$(this.input) if (this.input && this.input.addEventListener) {
.on("focus", function () { this.input.addEventListener("focus", function () {
self.input.isFocused = true; self.input.isFocused = true;
if (self.controller.settings.isViewerMode) { if (self.controller.settings.isViewerMode) {
return; return;
} }
self.controller.setStrictClose(true); self.controller.setStrictClose(true);
self.cellEditor.callTopLineMouseup = true; self.cellEditor.callTopLineMouseup = true;
if (!self.controller.isCellEditMode && !self.controller.isFillHandleMode) { if (!self.controller.isCellEditMode && !self.controller.isFillHandleMode) {
self._onEditCell(0, 0, /*isCoord*/false, /*isFocus*/true); self._onEditCell(0, 0, /*isCoord*/false, /*isFocus*/true);
} }
}); }, false);
}
this.cellEditor = new asc_CE(this.element, this.input, this.fmgrGraphics, this.m_oFont, this.cellEditor = new asc_CE(this.element, this.input, this.fmgrGraphics, this.m_oFont,
/*handlers*/{ /*handlers*/{
......
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