Skip to content

Commit

Permalink
Fix input in telegram web view
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Sep 27, 2024
1 parent 53df028 commit 182ff81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion common/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ var AscBrowser = {
chromeVersion : 70,
iosVersion : 13,
isAndroidNativeApp : false,
safariVersion : 17004001
safariVersion : 17004001,
isTelegramWebView : false
};

// user agent lower case
Expand Down Expand Up @@ -177,6 +178,8 @@ AscBrowser.isNeedEmulateUpload = (AscBrowser.userAgent.indexOf("needemulateuploa

AscBrowser.isAndroidNativeApp = (AscBrowser.userAgent.indexOf("ascandroidwebview") > -1);

AscBrowser.isTelegramWebView = (typeof TelegramWebviewProxy === "object") ? true : false;

AscBrowser.zoom = 1;

AscBrowser.isCustomScaling = function()
Expand Down
2 changes: 1 addition & 1 deletion common/text_input2.js
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
{
_style = ("left:-" + (this.HtmlAreaWidth >> 1) + "px;top:" + (-this.HtmlAreaOffset) + "px;");
_style += "color:transparent;caret-color:transparent;background:transparent;";
_style += AscCommon.AscBrowser.isAppleDevices ? "font-size:0px;" : "font-size:8px;";
_style += (AscCommon.AscBrowser.isAppleDevices && !AscCommon.AscBrowser.isTelegramWebView) ? "font-size:0px;" : "font-size:8px;";
}
else
{
Expand Down

0 comments on commit 182ff81

Please sign in to comment.