Jan 22 2024 04:16 AM - edited Jan 22 2024 04:51 AM
After switching to New Teams, Alert and Confirm javascript functions do not work.
Note: Alert and Confirm functions works in Teams Classic version.
Jan 22 2024 05:02 AM - edited Jan 22 2024 05:03 AM
@Vaibhavi2495 - Could you please provide more details on your issue? Please provide the code snippets or SDK references
Jan 22 2024 05:54 AM - edited Jan 22 2024 06:15 AM
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,
Jan 23 2024 12:34 AM
@Vaibhavi2495 - 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?
Jan 23 2024 03:46 AM - edited Jan 23 2024 03:48 AM
Yes, it works fine in Web browser but not in desktop app.
We are expecting it to work in desktop app as well.
Jan 23 2024 06:13 AM
@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.
Feb 14 2024 02:32 AM - edited Feb 14 2024 02:32 AM
SolutionHello @Vaibhavi2495
Regarding alert/confirm/prompt dialogs
We 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-modul...
We have raised one bug also to add a note in the documentation:
Feb 14 2024 02:32 AM - edited Feb 14 2024 02:32 AM
SolutionHello @Vaibhavi2495
Regarding alert/confirm/prompt dialogs
We 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-modul...
We have raised one bug also to add a note in the documentation: