Skip to content

Commit

Permalink
Fix bug with focus in mobile version
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Nov 25, 2024
1 parent b1fe2ae commit c09d21b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cell/view/EventsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,8 @@
touchManager.stopTouchingInProcess();
return res;
}
if (touchManager)
touchManager.checkMouseFocus(e);

var t = this;
asc["editor"].checkInterfaceElementBlur();
Expand Down
10 changes: 10 additions & 0 deletions common/Scrolls/mobileTouchManagerBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions pdf/src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,9 @@
return res;
}

if (oThis.touchManager)
oThis.touchManager.checkMouseFocus(e);

oThis.isFocusOnThumbnails = false;
AscCommon.stopEvent(e);

Expand Down
3 changes: 3 additions & 0 deletions slide/Drawing/HtmlPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3295,6 +3295,9 @@ function CEditorPage(api)
return res;
}

if (oThis.MobileTouchManager)
oThis.MobileTouchManager.checkMouseFocus(e);

oThis.m_oApi.checkInterfaceElementBlur();
oThis.m_oApi.checkLastWork();

Expand Down
3 changes: 3 additions & 0 deletions word/Drawing/HtmlPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,9 @@ function CEditorPage(api)
return res;
}

if (oThis.MobileTouchManager)
oThis.MobileTouchManager.checkMouseFocus(e);

oThis.m_oApi.checkInterfaceElementBlur();
oThis.m_oApi.checkLastWork();

Expand Down

0 comments on commit c09d21b

Please sign in to comment.