title: Telegram WebApp sendData method doesn't work on MacOS
body: <p>I am trying to figure out how to correctly work with WebApp added to Telegram API.</p>
  <p>So, I have a simple setup of a React app and Bot. React app has counter and all I need is send counter data back to bot using <a href="https://core.telegram.org/bots/webapps#initializing-web-apps" rel="nofollow noreferrer">sendData</a> method.</p>
  <p>Bot returns keyboard button, as mentioned in <a href="https://core.telegram.org/bots/webapps#keyboard-button-web-apps" rel="nofollow noreferrer">telegram docs</a> with link to my web-app</p>
  <pre><code>private async returnButton(ctx: Context&lt;Update&gt;): Promise&lt;void | object&gt; {
      ctx.reply('Enter number', Markup.keyboard([
            Markup.button.webApp('Open counter', 'https://75bc-185-115-37-241.eu.ngrok.io')
      ]).resize())
      return {};
  }
  </code></pre>
  <p>Here's part of React app:</p>
  <pre><code>useEffect(() =&gt; {
      Telegram.WebApp.ready();
  
      Telegram.WebApp.MainButton.isVisible = true;
      setDebug(Telegram.WebApp.sendData.toString());
  }, [])
  
  useEffect(() =&gt; {
      Telegram.WebApp.onEvent('mainButtonClicked', () =&gt; {
          Telegram.WebApp.MainButton.text = 'Clicked!';
  
          try {
            Telegram.WebApp.sendData(JSON.stringify({ counter }));
            setDebug(`Sent`);
          } catch (e) {
            setDebug(`${e}, ${JSON.stringify(e)}`)
          }
      })
  }, [counter])
  </code></pre>
  <blockquote>
  <p>I've added <code>setDebug(Telegram.WebApp.sendData.toString())</code> just to
  make sure method is present. I didn't find any good ways for debugging, as I have no
  access to smth like devtools in webapp window</p>
  </blockquote>
  <p>So below gif shows what happens when I click button on Mac client. Debug data set to <code>Sent</code> and no errors pops out. But modal doesn't close as it should and most importantly bot doesn't receive any data from webapp.</p>
  <p><a href="https://i.stack.imgur.com/9vksz.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9vksz.gif" alt="enter image description here" /></a></p>
  <p>Though using iOS/ipadOS telegram flow works fine. Window closes and data sent to bot.</p>
  <p><a href="https://i.stack.imgur.com/iLTtx.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iLTtx.gif" alt="enter image description here" /></a></p>
  <p>I have tried to reinstall Telegram client, but still no changes. Did I miss something or this is Mac client bug?</p>