sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx ACE : Value of "this.context.deviceContext" incorrect in Teams desktop

Open anoopt opened this issue 3 years ago • 4 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Linux

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [X] other (enter in the "Additional environment details" area below)

Additional environment details

  • Teams desktop app

Describe the bug / error

While developing ACEs, we can get to know the device context using this.context.deviceContext.

The value of that should one of WebView, Mobile or TeamsDesktop based on where we access the ACE from.

This property gives the correct output when in browser (WebView) or in Teams mobile app (Mobile).

However, in Teams desktop app the value is WebView whereas, it should be TeamsDesktop.

image

Steps to reproduce

  1. Create an ACE using SPFx
  2. In the onInit method alert the property this.context.deviceContext
  3. Open the ACE in Teams desktop app

Expected behavior

In Teams desktop app the value of this.context.deviceContext should be TeamsDesktop.

anoopt avatar Feb 18 '22 12:02 anoopt

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Feb 18 '22 12:02 ghost

@anoopt , sorry for our delay in answering. We indeed had some issues in our code that was reporting incorrect information but that should now have been fixed. Can you please check and see if the issue still exists?

lucabandMSFT avatar Mar 17 '22 00:03 lucabandMSFT

Thank you @lucabandMSFT - Tested this with SPFx 1.15.0-beta.1, the value is correct on the initial load however if you navigate to a different area in Teams and open the Viva connections app, the value shows as WebView again.

2022-03-18_18-58-56

anoopt avatar Mar 18 '22 19:03 anoopt

Thanks you @anoopt , looking on the issue now. Also, one question. The "Viva Connections" app you are using is the one that comes out of the box from Teams app, right? it is not this one: https://docs.microsoft.com/en-us/sharepoint/viva-connections-desktop

lucabandMSFT avatar Aug 23 '22 16:08 lucabandMSFT

@anoopt - could you please reply to the Luca's question? Thanks!

AJIXuMuK avatar Jan 05 '23 12:01 AJIXuMuK

Sorry for the delayed response yes, I am using the "Viva Connections" that comes out of the box from Teams app.

anoopt avatar Jan 10 '23 18:01 anoopt

@anoopt, thanks. And, to be clear, the issue is happening right now as well? Can you please confirm it?

lucabandMSFT avatar Jan 10 '23 22:01 lucabandMSFT

Sure @lucabandMSFT will test with the latest SPFx version and let you know.

anoopt avatar Jan 11 '23 17:01 anoopt

@anoopt - were you able to check if the issue is still repro-ed?

AJIXuMuK avatar Mar 01 '23 16:03 AJIXuMuK

Sorry for the delay in getting back. This can now be closed.

anoopt avatar Mar 01 '23 16:03 anoopt

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Mar 09 '23 00:03 ghost