如何禁用通过向下滑动关闭 Telegram Web 应用程序?

问题描述 投票:0回答:2

我正在使用 React Js 创建一个应用程序。 TG Web 应用程序中有一个游戏。您需要通过收集组合来消除球。但是当我向下滑动时,Tg 想要关闭。The game

我尝试添加

touch-action : none
但不起作用

telegram telegram-bot
2个回答
0
投票

app.isClosingConfirmationEnabled = true;


0
投票

我认为他说的是你可以编写这个代码:

const app = window.Telegram.WebApp;
app.ready()
app.isClosingConfirmationEnabled = true;

它对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.