Fix bug with focus in mobile version

This commit is contained in:
Oleg Korshul
2024-11-25 15:15:45 +03:00
parent b1fe2ae32b
commit c09d21bcf5
5 changed files with 21 additions and 0 deletions

View File

@ -1642,6 +1642,8 @@
touchManager.stopTouchingInProcess();
return res;
}
if (touchManager)
touchManager.checkMouseFocus(e);
var t = this;
asc["editor"].checkInterfaceElementBlur();

View File

@ -764,6 +764,16 @@
return true;
};
CMobileTouchManagerBase.prototype.checkMouseFocus = function(e)
{
// mobile version does not get focus with mouse events
if (this.Api.isMobileVersion && e && "mouse" === e.pointerType)
{
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.setInterfaceEnableKeyEvents(true);
}
};
CMobileTouchManagerBase.prototype.checkTouchEvent = function(e)
{
if (!e)

View File

@ -1990,6 +1990,9 @@
return res;
}
if (oThis.touchManager)
oThis.touchManager.checkMouseFocus(e);
oThis.isFocusOnThumbnails = false;
AscCommon.stopEvent(e);

View File

@ -3295,6 +3295,9 @@ function CEditorPage(api)
return res;
}
if (oThis.MobileTouchManager)
oThis.MobileTouchManager.checkMouseFocus(e);
oThis.m_oApi.checkInterfaceElementBlur();
oThis.m_oApi.checkLastWork();

View File

@ -1729,6 +1729,9 @@ function CEditorPage(api)
return res;
}
if (oThis.MobileTouchManager)
oThis.MobileTouchManager.checkMouseFocus(e);
oThis.m_oApi.checkInterfaceElementBlur();
oThis.m_oApi.checkLastWork();