Commit 2a606145 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

переделана обработка keyDown/keyPress. Вместо одного булла - флаги

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64698 954022d7-b5bf-4e40-9824-e11837661b57
parent 22053922
......@@ -1854,8 +1854,22 @@ function CEditorPage(api)
}
var oWordControl = oThis;
if (false === oWordControl.m_oApi.bInit_word_control || oWordControl.IsFocus === false || oWordControl.m_oApi.asc_IsLongAction() || oWordControl.m_bIsMouseLock === true)
if (false === oWordControl.m_oApi.bInit_word_control)
{
check_KeyboardEvent2(e);
e.preventDefault();
return;
}
if (oWordControl.IsFocus === false)
return;
if (oWordControl.m_oApi.asc_IsLongAction() || oWordControl.m_bIsMouseLock === true)
{
check_KeyboardEvent2(e);
e.preventDefault();
return;
}
if (oThis.DemonstrationManager.Mode)
{
......@@ -1897,8 +1911,11 @@ function CEditorPage(api)
oWordControl.StartUpdateOverlay();
oWordControl.IsKeyDownButNoPress = true;
oWordControl.bIsUseKeyPress = (oWordControl.m_oLogicDocument.OnKeyDown(global_keyboardEvent) === true) ? false : true;
if (false === oWordControl.bIsUseKeyPress)// || true === global_keyboardEvent.AltKey)
var _ret_mouseDown = oWordControl.m_oLogicDocument.OnKeyDown(global_keyboardEvent);
oWordControl.bIsUseKeyPress = ((_ret_mouseDown & keydownresult_PreventKeyPress) != 0) ? false : true;
if ((_ret_mouseDown & keydownresult_PreventDefault) != 0)
{
// убираем превент с альтом. Уж больно итальянцы недовольны.
e.preventDefault();
......
......@@ -2381,11 +2381,13 @@ function CEditorPage(api)
oWordControl.StartUpdateOverlay();
oWordControl.IsKeyDownButNoPress = true;
oWordControl.bIsUseKeyPress = (oWordControl.m_oLogicDocument.OnKeyDown(global_keyboardEvent) === true) ? false : true ;
var _ret_mouseDown = oWordControl.m_oLogicDocument.OnKeyDown(global_keyboardEvent);
oWordControl.bIsUseKeyPress = ((_ret_mouseDown & keydownresult_PreventKeyPress) != 0) ? false : true;
oWordControl.EndUpdateOverlay();
if (false === oWordControl.bIsUseKeyPress)// || (true === global_keyboardEvent.AltKey && !AscBrowser.isMacOs))
if ((_ret_mouseDown & keydownresult_PreventDefault) != 0)// || (true === global_keyboardEvent.AltKey && !AscBrowser.isMacOs))
{
// убираем превент с альтом. Уж больно итальянцы недовольны.
e.preventDefault();
......
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