Commit 4883c260 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@55343 954022d7-b5bf-4e40-9824-e11837661b57
parent 2bb572b6
......@@ -2127,14 +2127,16 @@
t._addChars(String.fromCharCode(event.which));
if (t.textRender.getEndOfText() === t.cursorPos && !t.isFormula()) {
var s = t._getFragmentsText(t.options.fragments);
var arrAutoComplete = t._getAutoComplete(s.toLowerCase());
var lengthInput = s.length;
if (1 === arrAutoComplete.length) {
var newValue = arrAutoComplete[0];
var tmpCursorPos = t.cursorPos;
t._addChars(newValue.substring(lengthInput));
t.selectionBegin = tmpCursorPos;
t._selectChars(kEndOfText);
if (!isNumber(s)) {
var arrAutoComplete = t._getAutoComplete(s.toLowerCase());
var lengthInput = s.length;
if (1 === arrAutoComplete.length) {
var newValue = arrAutoComplete[0];
var tmpCursorPos = t.cursorPos;
t._addChars(newValue.substring(lengthInput));
t.selectionBegin = tmpCursorPos;
t._selectChars(kEndOfText);
}
}
}
......
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