AzureAD / azure-activedirectory-library-for-js

The code for ADAL.js and ADAL Angular has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/adal-angular
Apache License 2.0
627 stars 372 forks source link

Silent sign in iframe has size and disrupts page layout #849

Closed harryhaomsft closed 4 years ago

harryhaomsft commented 5 years ago

When ADAL.js creates the hidden iframe to acquire token, the iframe is still occupying a 4x4 space. And it causes page layout to change(scroll bars appear). It looks like the style of the iframe is set to visibility: hidden which only hides the element but does not remove the presence in the DOM. Using display:none should be able to fix this.

Repros on all browsers.

Library Name

Library version

Library version: 1.0.17

bjaskj commented 5 years ago

A quick hack for this while waiting for change is to use this CSS:

[id^="adal"] {
  display: none;
}
jmckennon commented 4 years ago

This is a known bug in adal js, and is fixed in msal js. You can also use the workaround stated by @bjaskj for adal js. All current authentication work from Microsoft is delivered through the msal js library here. adal js is still supported only for security fixes. We recommend moving to msal js for any advanced feature requests and bugfixes.