A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
I have an event based Outlook addin with an ItemSend Event. When the user clicks on the Send button, I need to open a dialog using the displayDialogAsync. Since this only accepts a percentage for width/height I am calculating the ideal percentage based on the screen size for my content to fit without any scroll bars or extra space.
In javascript, window.innerHeight returns the value 0
In Firefox, even the window.outerHeight returns 0 while in chrome and edge, window.outerHeight returns the correct value.
Your Environment
Platform [PC desktop, Mac, iOS, Office on the web]: Office on the web
Host [Excel, Word, PowerPoint, etc.]: Outlook
Office version number: Version 2305 (Build 16501.20242)
Operating System: Win 11
Browser (if using Office on the web): Edge/Chrome/Firefox
Expected behavior
Expected behaviour is to have the correct values in the window object. Outlook should not change any of the original values of the window object or if it is being copied, all properties should be copied accordingly so that the correct values are used inside the addin.
Current behavior
Current behaviour is that window.innerHeight returns 0
Steps to reproduce
Any addin with any event such as ribbon button click or on send
Call window.innerHeight
Check value
@elemen7s Thanks for reporting this issue regarding window height. It has been put on our backlog. We unfortunately have no timelines to share at this point
Internal tracking id: Office: 3816286
I have an event based Outlook addin with an ItemSend Event. When the user clicks on the Send button, I need to open a dialog using the displayDialogAsync. Since this only accepts a percentage for width/height I am calculating the ideal percentage based on the screen size for my content to fit without any scroll bars or extra space.
In javascript, window.innerHeight returns the value 0
In Firefox, even the window.outerHeight returns 0 while in chrome and edge, window.outerHeight returns the correct value.
Your Environment
Expected behavior
Expected behaviour is to have the correct values in the window object. Outlook should not change any of the original values of the window object or if it is being copied, all properties should be copied accordingly so that the correct values are used inside the addin.
Current behavior
Current behaviour is that window.innerHeight returns 0
Steps to reproduce
Any addin with any event such as ribbon button click or on send Call window.innerHeight Check value