Forum Discussion
Vaibhavi2495
Jan 22, 2024Copper Contributor
Javascript functions not working in New Teams Tab App
After switching to New Teams, Alert and Confirm javascript functions do not work. Note: Alert and Confirm functions works in Teams Classic version.
- Feb 14, 2024
Hello Vaibhavi2495
Regarding alert/confirm/prompt dialogsWe got an update from engineering team that:
The alert/confirm/prompt dialogs provide a subpar user experience and present a security risk since they can be used by apps to spoof the user. We are not planning to make these APIs work in New Teams and Chromium-based browsers are on a path to deprecating this functionality too:
https://groups.google.com/a/chromium.org/g/blink-dev/c/hTOXiBj3D6A/m/JtkdpDd1BAAJ
Please either render inline dialogs within their frame or launch a Task Module (aka Dialog):
https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/what-are-task-modulesWe have raised one bug also to add a note in the documentation:
Vaibhavi2495
Jan 22, 2024Copper Contributor
Hi Prasad_Das-MSFT ,
We are using basic JavaScript function "confirm( )" in our teams embedded tab web app. It is working fine in older version of MS Teams, But it is not working in the new Teams Desktop Version 23335.232.2637.4844.
I have attached the MS Teams App Package Zip file for your reference.
Here is my one line of code of my embedded page:
<input type="button" value="Are you sure?" onclick="javascript:confirm('Hey CONFIRM is working!!')"/>
Thanks in advance,
Prasad_Das-MSFT
Microsoft
Jan 23, 2024Vaibhavi2495 - We tested the app both in Legacy Teams and New Teams (Both in Desktop and Web client) and observed below behaviour.
In Teams Classic (Legacy): (Both Desktop and Web): It works fine
In New Teams: In web client it works fine, but in Desktop clients it doesn't work.
Web Client:
Desktop Client:
Is it working for you in web client (New Teams). Could you please confirm?
- Vaibhavi2495Jan 23, 2024Copper Contributor
Yes, it works fine in Web browser but not in desktop app.
We are expecting it to work in desktop app as well.
- ChetanSharma-msftFeb 14, 2024
Microsoft
Hello Vaibhavi2495
Regarding alert/confirm/prompt dialogsWe got an update from engineering team that:
The alert/confirm/prompt dialogs provide a subpar user experience and present a security risk since they can be used by apps to spoof the user. We are not planning to make these APIs work in New Teams and Chromium-based browsers are on a path to deprecating this functionality too:
https://groups.google.com/a/chromium.org/g/blink-dev/c/hTOXiBj3D6A/m/JtkdpDd1BAAJ
Please either render inline dialogs within their frame or launch a Task Module (aka Dialog):
https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/what-are-task-modulesWe have raised one bug also to add a note in the documentation:
- Prasad_Das-MSFTJan 23, 2024
Microsoft
Vaibhavi2495 - Thanks for confirming. We have raised a bug for the same. We will inform you once we get any further update from engineering team.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.